home *** CD-ROM | disk | FTP | other *** search
/ PC Format (PL) 2008 February / PC_Format_022008.iso / Internet / Mozilla Thunderbird wtyczki / lightning-0.7-tb-win.xpi / chrome / lightning.jar < prev   
PKZip Archive  |  2007-10-23  |  166.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: PKZip Archive (archive/zip).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert PKZip Archive (archive/zip) magic Supported
66% dexvert JAR Archive (archive/jar) ext Supported
100% file Zip archive data, made by v2.3 UNIX, extract using at least v1.0, last modified, last modified Sun, Aug 21 2006 10:49:40, uncompressed size 4005, method=store default
99% file Zip archive, with extra data prepended default
98% file data default
72% TrID Sweet Home 3D design (generic) default (weak)
27% TrID ZIP compressed archive default
100% dexmagic PrintFox/Pagefox WEAK default
100% lsar Zip default
100% gt2 ZIP Archiv gefunden (Auflistung ist deaktiviert) default
100% detectItEasy Archive: Zip(1.0)[100.0%,23 files] default
100% binwalkID Zip archive data, at least v1.0 to extract, compressed size: 4005, uncompressed size: 4005, name: content/lightning/lightning-utils.js default
100% xdgMime application/zip default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 4b 03 04 0a 00 00 00 | 00 00 34 56 15 35 1d 1f |PK......|..4V.5..|
|00000010| 5f fe a5 0f 00 00 a5 0f | 00 00 24 00 00 00 63 6f |_.......|..$...co|
|00000020| 6e 74 65 6e 74 2f 6c 69 | 67 68 74 6e 69 6e 67 2f |ntent/li|ghtning/|
|00000030| 6c 69 67 68 74 6e 69 6e | 67 2d 75 74 69 6c 73 2e |lightnin|g-utils.|
|00000040| 6a 73 2f 2a 20 2a 2a 2a | 2a 2a 20 42 45 47 49 4e |js/* ***|** BEGIN|
|00000050| 20 4c 49 43 45 4e 53 45 | 20 42 4c 4f 43 4b 20 2a | LICENSE| BLOCK *|
|00000060| 2a 2a 2a 2a 0a 20 2a 20 | 56 65 72 73 69 6f 6e 3a |****. * |Version:|
|00000070| 20 4d 50 4c 20 31 2e 31 | 2f 47 50 4c 20 32 2e 30 | MPL 1.1|/GPL 2.0|
|00000080| 2f 4c 47 50 4c 20 32 2e | 31 0a 20 2a 0a 20 2a 20 |/LGPL 2.|1. *. * |
|00000090| 54 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |The cont|ents of |
|000000a0| 74 68 69 73 20 66 69 6c | 65 20 61 72 65 20 73 75 |this fil|e are su|
|000000b0| 62 6a 65 63 74 20 74 6f | 20 74 68 65 20 4d 6f 7a |bject to| the Moz|
|000000c0| 69 6c 6c 61 20 50 75 62 | 6c 69 63 20 4c 69 63 65 |illa Pub|lic Lice|
|000000d0| 6e 73 65 20 56 65 72 73 | 69 6f 6e 0a 20 2a 20 31 |nse Vers|ion. * 1|
|000000e0| 2e 31 20 28 74 68 65 20 | 22 4c 69 63 65 6e 73 65 |.1 (the |"License|
|000000f0| 22 29 3b 20 79 6f 75 20 | 6d 61 79 20 6e 6f 74 20 |"); you |may not |
|00000100| 75 73 65 20 74 68 69 73 | 20 66 69 6c 65 20 65 78 |use this| file ex|
|00000110| 63 65 70 74 20 69 6e 20 | 63 6f 6d 70 6c 69 61 6e |cept in |complian|
|00000120| 63 65 20 77 69 74 68 0a | 20 2a 20 74 68 65 20 4c |ce with.| * the L|
|00000130| 69 63 65 6e 73 65 2e 20 | 59 6f 75 20 6d 61 79 20 |icense. |You may |
|00000140| 6f 62 74 61 69 6e 20 61 | 20 63 6f 70 79 20 6f 66 |obtain a| copy of|
|00000150| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 20 61 74 0a | the Lic|ense at.|
|00000160| 20 2a 20 68 74 74 70 3a | 2f 2f 77 77 77 2e 6d 6f | * http:|//www.mo|
|00000170| 7a 69 6c 6c 61 2e 6f 72 | 67 2f 4d 50 4c 2f 0a 20 |zilla.or|g/MPL/. |
|00000180| 2a 0a 20 2a 20 53 6f 66 | 74 77 61 72 65 20 64 69 |*. * Sof|tware di|
|00000190| 73 74 72 69 62 75 74 65 | 64 20 75 6e 64 65 72 20 |stribute|d under |
|000001a0| 74 68 65 20 4c 69 63 65 | 6e 73 65 20 69 73 20 64 |the Lice|nse is d|
|000001b0| 69 73 74 72 69 62 75 74 | 65 64 20 6f 6e 20 61 6e |istribut|ed on an|
|000001c0| 20 22 41 53 20 49 53 22 | 20 62 61 73 69 73 2c 0a | "AS IS"| basis,.|
|000001d0| 20 2a 20 57 49 54 48 4f | 55 54 20 57 41 52 52 41 | * WITHO|UT WARRA|
|000001e0| 4e 54 59 20 4f 46 20 41 | 4e 59 20 4b 49 4e 44 2c |NTY OF A|NY KIND,|
|000001f0| 20 65 69 74 68 65 72 20 | 65 78 70 72 65 73 73 20 | either |express |
|00000200| 6f 72 20 69 6d 70 6c 69 | 65 64 2e 20 53 65 65 20 |or impli|ed. See |
|00000210| 74 68 65 20 4c 69 63 65 | 6e 73 65 0a 20 2a 20 66 |the Lice|nse. * f|
|00000220| 6f 72 20 74 68 65 20 73 | 70 65 63 69 66 69 63 20 |or the s|pecific |
|00000230| 6c 61 6e 67 75 61 67 65 | 20 67 6f 76 65 72 6e 69 |language| governi|
|00000240| 6e 67 20 72 69 67 68 74 | 73 20 61 6e 64 20 6c 69 |ng right|s and li|
|00000250| 6d 69 74 61 74 69 6f 6e | 73 20 75 6e 64 65 72 20 |mitation|s under |
|00000260| 74 68 65 0a 20 2a 20 4c | 69 63 65 6e 73 65 2e 0a |the. * L|icense..|
|00000270| 20 2a 0a 20 2a 20 54 68 | 65 20 4f 72 69 67 69 6e | *. * Th|e Origin|
|00000280| 61 6c 20 43 6f 64 65 20 | 69 73 20 4c 69 67 68 74 |al Code |is Light|
|00000290| 6e 69 6e 67 20 63 6f 64 | 65 2e 0a 20 2a 0a 20 2a |ning cod|e.. *. *|
|000002a0| 20 54 68 65 20 49 6e 69 | 74 69 61 6c 20 44 65 76 | The Ini|tial Dev|
|000002b0| 65 6c 6f 70 65 72 20 6f | 66 20 74 68 65 20 4f 72 |eloper o|f the Or|
|000002c0| 69 67 69 6e 61 6c 20 43 | 6f 64 65 20 69 73 20 4f |iginal C|ode is O|
|000002d0| 72 61 63 6c 65 20 43 6f | 72 70 6f 72 61 74 69 6f |racle Co|rporatio|
|000002e0| 6e 0a 20 2a 20 50 6f 72 | 74 69 6f 6e 73 20 63 72 |n. * Por|tions cr|
|000002f0| 65 61 74 65 64 20 62 79 | 20 74 68 65 20 49 6e 69 |eated by| the Ini|
|00000300| 74 69 61 6c 20 44 65 76 | 65 6c 6f 70 65 72 20 61 |tial Dev|eloper a|
|00000310| 72 65 20 43 6f 70 79 72 | 69 67 68 74 20 28 43 29 |re Copyr|ight (C)|
|00000320| 20 32 30 30 35 0a 20 2a | 20 74 68 65 20 49 6e 69 | 2005. *| the Ini|
|00000330| 74 69 61 6c 20 44 65 76 | 65 6c 6f 70 65 72 2e 20 |tial Dev|eloper. |
|00000340| 41 6c 6c 20 52 69 67 68 | 74 73 20 52 65 73 65 72 |All Righ|ts Reser|
|00000350| 76 65 64 2e 0a 20 2a 0a | 20 2a 20 43 6f 6e 74 72 |ved.. *.| * Contr|
|00000360| 69 62 75 74 6f 72 28 73 | 29 3a 0a 20 2a 20 20 20 |ibutor(s|):. * |
|00000370| 56 6c 61 64 69 6d 69 72 | 20 56 75 6b 69 63 65 76 |Vladimir| Vukicev|
|00000380| 69 63 20 3c 76 6c 61 64 | 69 6d 69 72 40 70 6f 62 |ic <vlad|imir@pob|
|00000390| 6f 78 2e 63 6f 6d 3e 0a | 20 2a 20 20 20 4d 69 6b |ox.com>.| * Mik|
|000003a0| 65 20 53 68 61 76 65 72 | 20 3c 73 68 61 76 65 72 |e Shaver| <shaver|
|000003b0| 40 6d 6f 7a 69 6c 6c 61 | 2e 6f 72 67 3e 0a 20 2a |@mozilla|.org>. *|
|000003c0| 20 20 20 4a 6f 65 79 20 | 4d 69 6e 74 61 20 3c 6a | Joey |Minta <j|
|000003d0| 6d 69 6e 74 61 40 67 6d | 61 69 6c 2e 63 6f 6d 3e |minta@gm|ail.com>|
|000003e0| 0a 20 2a 0a 20 2a 20 41 | 6c 74 65 72 6e 61 74 69 |. *. * A|lternati|
|000003f0| 76 65 6c 79 2c 20 74 68 | 65 20 63 6f 6e 74 65 6e |vely, th|e conten|
|00000400| 74 73 20 6f 66 20 74 68 | 69 73 20 66 69 6c 65 20 |ts of th|is file |
|00000410| 6d 61 79 20 62 65 20 75 | 73 65 64 20 75 6e 64 65 |may be u|sed unde|
|00000420| 72 20 74 68 65 20 74 65 | 72 6d 73 20 6f 66 0a 20 |r the te|rms of. |
|00000430| 2a 20 65 69 74 68 65 72 | 20 74 68 65 20 47 4e 55 |* either| the GNU|
|00000440| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|00000450| 4c 69 63 65 6e 73 65 20 | 56 65 72 73 69 6f 6e 20 |License |Version |
|00000460| 32 20 6f 72 20 6c 61 74 | 65 72 20 28 74 68 65 20 |2 or lat|er (the |
|00000470| 22 47 50 4c 22 29 2c 20 | 6f 72 20 0a 20 2a 20 74 |"GPL"), |or . * t|
|00000480| 68 65 20 47 4e 55 20 4c | 65 73 73 65 72 20 47 65 |he GNU L|esser Ge|
|00000490| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|000004a0| 65 6e 73 65 20 56 65 72 | 73 69 6f 6e 20 32 2e 31 |ense Ver|sion 2.1|
|000004b0| 20 6f 72 20 6c 61 74 65 | 72 20 28 74 68 65 20 22 | or late|r (the "|
|000004c0| 4c 47 50 4c 22 29 2c 0a | 20 2a 20 69 6e 20 77 68 |LGPL"),.| * in wh|
|000004d0| 69 63 68 20 63 61 73 65 | 20 74 68 65 20 70 72 6f |ich case| the pro|
|000004e0| 76 69 73 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 47 |visions |of the G|
|000004f0| 50 4c 20 6f 72 20 74 68 | 65 20 4c 47 50 4c 20 61 |PL or th|e LGPL a|
|00000500| 72 65 20 61 70 70 6c 69 | 63 61 62 6c 65 20 69 6e |re appli|cable in|
|00000510| 73 74 65 61 64 0a 20 2a | 20 6f 66 20 74 68 6f 73 |stead. *| of thos|
|00000520| 65 20 61 62 6f 76 65 2e | 20 49 66 20 79 6f 75 20 |e above.| If you |
|00000530| 77 69 73 68 20 74 6f 20 | 61 6c 6c 6f 77 20 75 73 |wish to |allow us|
|00000540| 65 20 6f 66 20 79 6f 75 | 72 20 76 65 72 73 69 6f |e of you|r versio|
|00000550| 6e 20 6f 66 20 74 68 69 | 73 20 66 69 6c 65 20 6f |n of thi|s file o|
|00000560| 6e 6c 79 0a 20 2a 20 75 | 6e 64 65 72 20 74 68 65 |nly. * u|nder the|
|00000570| 20 74 65 72 6d 73 20 6f | 66 20 65 69 74 68 65 72 | terms o|f either|
|00000580| 20 74 68 65 20 47 50 4c | 20 6f 72 20 74 68 65 20 | the GPL| or the |
|00000590| 4c 47 50 4c 2c 20 61 6e | 64 20 6e 6f 74 20 74 6f |LGPL, an|d not to|
|000005a0| 20 61 6c 6c 6f 77 20 6f | 74 68 65 72 73 20 74 6f | allow o|thers to|
|000005b0| 0a 20 2a 20 75 73 65 20 | 79 6f 75 72 20 76 65 72 |. * use |your ver|
|000005c0| 73 69 6f 6e 20 6f 66 20 | 74 68 69 73 20 66 69 6c |sion of |this fil|
|000005d0| 65 20 75 6e 64 65 72 20 | 74 68 65 20 74 65 72 6d |e under |the term|
|000005e0| 73 20 6f 66 20 74 68 65 | 20 4d 50 4c 2c 20 69 6e |s of the| MPL, in|
|000005f0| 64 69 63 61 74 65 20 79 | 6f 75 72 0a 20 2a 20 64 |dicate y|our. * d|
|00000600| 65 63 69 73 69 6f 6e 20 | 62 79 20 64 65 6c 65 74 |ecision |by delet|
|00000610| 69 6e 67 20 74 68 65 20 | 70 72 6f 76 69 73 69 6f |ing the |provisio|
|00000620| 6e 73 20 61 62 6f 76 65 | 20 61 6e 64 20 72 65 70 |ns above| and rep|
|00000630| 6c 61 63 65 20 74 68 65 | 6d 20 77 69 74 68 20 74 |lace the|m with t|
|00000640| 68 65 20 6e 6f 74 69 63 | 65 0a 20 2a 20 61 6e 64 |he notic|e. * and|
|00000650| 20 6f 74 68 65 72 20 70 | 72 6f 76 69 73 69 6f 6e | other p|rovision|
|00000660| 73 20 72 65 71 75 69 72 | 65 64 20 62 79 20 74 68 |s requir|ed by th|
|00000670| 65 20 47 50 4c 20 6f 72 | 20 74 68 65 20 4c 47 50 |e GPL or| the LGP|
|00000680| 4c 2e 20 49 66 20 79 6f | 75 20 64 6f 20 6e 6f 74 |L. If yo|u do not|
|00000690| 20 64 65 6c 65 74 65 0a | 20 2a 20 74 68 65 20 70 | delete.| * the p|
|000006a0| 72 6f 76 69 73 69 6f 6e | 73 20 61 62 6f 76 65 2c |rovision|s above,|
|000006b0| 20 61 20 72 65 63 69 70 | 69 65 6e 74 20 6d 61 79 | a recip|ient may|
|000006c0| 20 75 73 65 20 79 6f 75 | 72 20 76 65 72 73 69 6f | use you|r versio|
|000006d0| 6e 20 6f 66 20 74 68 69 | 73 20 66 69 6c 65 20 75 |n of thi|s file u|
|000006e0| 6e 64 65 72 0a 20 2a 20 | 74 68 65 20 74 65 72 6d |nder. * |the term|
|000006f0| 73 20 6f 66 20 61 6e 79 | 20 6f 6e 65 20 6f 66 20 |s of any| one of |
|00000700| 74 68 65 20 4d 50 4c 2c | 20 74 68 65 20 47 50 4c |the MPL,| the GPL|
|00000710| 20 6f 72 20 74 68 65 20 | 4c 47 50 4c 2e 0a 20 2a | or the |LGPL.. *|
|00000720| 0a 20 2a 20 2a 2a 2a 2a | 2a 20 45 4e 44 20 4c 49 |. * ****|* END LI|
|00000730| 43 45 4e 53 45 20 42 4c | 4f 43 4b 20 2a 2a 2a 2a |CENSE BL|OCK ****|
|00000740| 2a 20 2a 2f 0a 0a 66 75 | 6e 63 74 69 6f 6e 20 6c |* */..fu|nction l|
|00000750| 74 6e 43 72 65 61 74 65 | 49 6e 73 74 61 6e 63 65 |tnCreate|Instance|
|00000760| 28 63 69 64 2c 20 69 66 | 61 63 65 29 20 7b 0a 20 |(cid, if|ace) {. |
|00000770| 20 20 20 69 66 20 28 21 | 69 66 61 63 65 29 0a 20 | if (!|iface). |
|00000780| 20 20 20 20 20 20 20 69 | 66 61 63 65 20 3d 20 22 | i|face = "|
|00000790| 6e 73 49 53 75 70 70 6f | 72 74 73 22 3b 0a 20 20 |nsISuppo|rts";. |
|000007a0| 20 20 74 72 79 20 7b 0a | 20 20 20 20 20 20 20 20 | try {.| |
|000007b0| 72 65 74 75 72 6e 20 43 | 6f 6d 70 6f 6e 65 6e 74 |return C|omponent|
|000007c0| 73 2e 63 6c 61 73 73 65 | 73 5b 63 69 64 5d 2e 63 |s.classe|s[cid].c|
|000007d0| 72 65 61 74 65 49 6e 73 | 74 61 6e 63 65 28 43 6f |reateIns|tance(Co|
|000007e0| 6d 70 6f 6e 65 6e 74 73 | 2e 69 6e 74 65 72 66 61 |mponents|.interfa|
|000007f0| 63 65 73 5b 69 66 61 63 | 65 5d 29 3b 0a 20 20 20 |ces[ifac|e]);. |
|00000800| 20 7d 20 63 61 74 63 68 | 28 65 29 20 7b 0a 20 20 | } catch|(e) {. |
|00000810| 20 20 20 20 20 20 64 75 | 6d 70 28 22 23 23 23 23 | du|mp("####|
|00000820| 20 6c 74 6e 43 72 65 61 | 74 65 49 6e 73 74 61 6e | ltnCrea|teInstan|
|00000830| 63 65 20 66 61 69 6c 65 | 64 20 66 6f 72 3a 20 22 |ce faile|d for: "|
|00000840| 20 2b 20 63 69 64 20 2b | 20 22 5c 6e 22 29 3b 0a | + cid +| "\n");.|
|00000850| 20 20 20 20 20 20 20 20 | 76 61 72 20 66 72 61 6d | |var fram|
|00000860| 65 20 3d 20 43 6f 6d 70 | 6f 6e 65 6e 74 73 2e 73 |e = Comp|onents.s|
|00000870| 74 61 63 6b 3b 0a 20 20 | 20 20 20 20 20 20 66 6f |tack;. | fo|
|00000880| 72 20 28 76 61 72 20 69 | 20 3d 20 30 3b 20 66 72 |r (var i| = 0; fr|
|00000890| 61 6d 65 20 26 26 20 28 | 69 20 3c 20 34 29 3b 20 |ame && (|i < 4); |
|000008a0| 69 2b 2b 29 20 7b 0a 20 | 20 20 20 20 20 20 20 20 |i++) {. | |
|000008b0| 20 20 20 64 75 6d 70 28 | 69 20 2b 20 22 3a 20 22 | dump(|i + ": "|
|000008c0| 20 2b 20 66 72 61 6d 65 | 20 2b 20 22 5c 6e 22 29 | + frame| + "\n")|
|000008d0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 66 72 |;. | fr|
|000008e0| 61 6d 65 20 3d 20 66 72 | 61 6d 65 2e 63 61 6c 6c |ame = fr|ame.call|
|000008f0| 65 72 3b 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 |er;. | }. |
|00000900| 20 20 20 20 20 20 74 68 | 72 6f 77 20 65 3b 0a 20 | th|row e;. |
|00000910| 20 20 20 7d 0a 7d 0a 0a | 66 75 6e 63 74 69 6f 6e | }.}..|function|
|00000920| 20 6c 74 6e 47 65 74 53 | 65 72 76 69 63 65 28 63 | ltnGetS|ervice(c|
|00000930| 69 64 2c 20 69 66 61 63 | 65 29 20 7b 0a 20 20 20 |id, ifac|e) {. |
|00000940| 20 69 66 20 28 21 69 66 | 61 63 65 29 0a 20 20 20 | if (!if|ace). |
|00000950| 20 20 20 20 20 69 66 61 | 63 65 20 3d 20 22 6e 73 | ifa|ce = "ns|
|00000960| 49 53 75 70 70 6f 72 74 | 73 22 3b 0a 20 20 20 20 |ISupport|s";. |
|00000970| 74 72 79 20 7b 0a 20 20 | 20 20 20 20 20 20 72 65 |try {. | re|
|00000980| 74 75 72 6e 20 43 6f 6d | 70 6f 6e 65 6e 74 73 2e |turn Com|ponents.|
|00000990| 63 6c 61 73 73 65 73 5b | 63 69 64 5d 2e 67 65 74 |classes[|cid].get|
|000009a0| 53 65 72 76 69 63 65 28 | 43 6f 6d 70 6f 6e 65 6e |Service(|Componen|
|000009b0| 74 73 2e 69 6e 74 65 72 | 66 61 63 65 73 5b 69 66 |ts.inter|faces[if|
|000009c0| 61 63 65 5d 29 3b 0a 20 | 20 20 20 7d 20 63 61 74 |ace]);. | } cat|
|000009d0| 63 68 28 65 29 20 7b 0a | 20 20 20 20 20 20 20 20 |ch(e) {.| |
|000009e0| 64 75 6d 70 28 22 23 23 | 23 23 20 6c 74 6e 47 65 |dump("##|## ltnGe|
|000009f0| 74 53 65 72 76 69 63 65 | 20 66 61 69 6c 65 64 20 |tService| failed |
|00000a00| 66 6f 72 3a 20 22 20 2b | 20 63 69 64 20 2b 20 22 |for: " +| cid + "|
|00000a10| 5c 6e 22 29 3b 0a 20 20 | 20 20 20 20 20 20 76 61 |\n");. | va|
|00000a20| 72 20 66 72 61 6d 65 20 | 3d 20 43 6f 6d 70 6f 6e |r frame |= Compon|
|00000a30| 65 6e 74 73 2e 73 74 61 | 63 6b 3b 0a 20 20 20 20 |ents.sta|ck;. |
|00000a40| 20 20 20 20 66 6f 72 20 | 28 76 61 72 20 69 20 3d | for |(var i =|
|00000a50| 20 30 3b 20 66 72 61 6d | 65 20 26 26 20 28 69 20 | 0; fram|e && (i |
|00000a60| 3c 20 34 29 3b 20 69 2b | 2b 29 20 7b 0a 20 20 20 |< 4); i+|+) {. |
|00000a70| 20 20 20 20 20 20 20 20 | 20 64 75 6d 70 28 69 20 | | dump(i |
|00000a80| 2b 20 22 3a 20 22 20 2b | 20 66 72 61 6d 65 20 2b |+ ": " +| frame +|
|00000a90| 20 22 5c 6e 22 29 3b 0a | 20 20 20 20 20 20 20 20 | "\n");.| |
|00000aa0| 20 20 20 20 66 72 61 6d | 65 20 3d 20 66 72 61 6d | fram|e = fram|
|00000ab0| 65 2e 63 61 6c 6c 65 72 | 3b 0a 20 20 20 20 20 20 |e.caller|;. |
|00000ac0| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 74 68 72 6f | }. | thro|
|00000ad0| 77 20 65 3b 0a 20 20 20 | 20 7d 0a 7d 0a 0a 76 61 |w e;. | }.}..va|
|00000ae0| 72 20 61 74 6f 6d 53 76 | 63 3b 0a 66 75 6e 63 74 |r atomSv|c;.funct|
|00000af0| 69 6f 6e 20 6c 74 6e 47 | 65 74 41 74 6f 6d 28 73 |ion ltnG|etAtom(s|
|00000b00| 74 72 29 20 7b 0a 20 20 | 20 20 69 66 20 28 21 61 |tr) {. | if (!a|
|00000b10| 74 6f 6d 53 76 63 29 20 | 7b 0a 20 20 20 20 20 20 |tomSvc) |{. |
|00000b20| 20 20 61 74 6f 6d 53 76 | 63 20 3d 20 6c 74 6e 47 | atomSv|c = ltnG|
|00000b30| 65 74 53 65 72 76 69 63 | 65 28 22 40 6d 6f 7a 69 |etServic|e("@mozi|
|00000b40| 6c 6c 61 2e 6f 72 67 2f | 61 74 6f 6d 2d 73 65 72 |lla.org/|atom-ser|
|00000b50| 76 69 63 65 3b 31 22 2c | 20 22 6e 73 49 41 74 6f |vice;1",| "nsIAto|
|00000b60| 6d 53 65 72 76 69 63 65 | 22 29 3b 0a 20 20 20 20 |mService|");. |
|00000b70| 7d 0a 0a 20 20 20 20 72 | 65 74 75 72 6e 20 61 74 |}.. r|eturn at|
|00000b80| 6f 6d 53 76 63 2e 67 65 | 74 41 74 6f 6d 28 73 74 |omSvc.ge|tAtom(st|
|00000b90| 72 29 3b 0a 7d 0a 0a 76 | 61 72 20 43 61 6c 44 61 |r);.}..v|ar CalDa|
|00000ba0| 74 65 54 69 6d 65 20 3d | 20 6e 65 77 20 43 6f 6d |teTime =| new Com|
|00000bb0| 70 6f 6e 65 6e 74 73 2e | 43 6f 6e 73 74 72 75 63 |ponents.|Construc|
|00000bc0| 74 6f 72 28 22 40 6d 6f | 7a 69 6c 6c 61 2e 6f 72 |tor("@mo|zilla.or|
|00000bd0| 67 2f 63 61 6c 65 6e 64 | 61 72 2f 64 61 74 65 74 |g/calend|ar/datet|
|00000be0| 69 6d 65 3b 31 22 2c 0a | 20 20 20 20 20 20 20 20 |ime;1",.| |
|00000bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000c10| 20 20 20 20 20 43 6f 6d | 70 6f 6e 65 6e 74 73 2e | Com|ponents.|
|00000c20| 69 6e 74 65 72 66 61 63 | 65 73 2e 63 61 6c 49 44 |interfac|es.calID|
|00000c30| 61 74 65 54 69 6d 65 29 | 3b 0a 0a 2f 2f 20 55 73 |ateTime)|;..// Us|
|00000c40| 65 20 74 68 65 73 65 20 | 66 75 6e 63 74 69 6f 6e |e these |function|
|00000c50| 73 2c 20 73 69 6e 63 65 | 20 73 65 74 74 69 6e 67 |s, since| setting|
|00000c60| 20 7c 65 6c 65 6d 65 6e | 74 2e 63 6f 6c 6c 61 70 | |elemen|t.collap|
|00000c70| 73 65 64 20 3d 20 74 72 | 75 65 7c 20 69 73 20 4e |sed = tr|ue| is N|
|00000c80| 4f 54 20 72 65 6c 69 61 | 62 6c 65 0a 66 75 6e 63 |OT relia|ble.func|
|00000c90| 74 69 6f 6e 20 63 6f 6c | 6c 61 70 73 65 45 6c 65 |tion col|lapseEle|
|00000ca0| 6d 65 6e 74 28 65 6c 65 | 6d 65 6e 74 29 20 7b 0a |ment(ele|ment) {.|
|00000cb0| 20 20 20 20 65 6c 65 6d | 65 6e 74 2e 73 74 79 6c | elem|ent.styl|
|00000cc0| 65 2e 76 69 73 69 62 69 | 6c 69 74 79 20 3d 20 22 |e.visibi|lity = "|
|00000cd0| 63 6f 6c 6c 61 70 73 65 | 22 3b 0a 7d 0a 0a 66 75 |collapse|";.}..fu|
|00000ce0| 6e 63 74 69 6f 6e 20 75 | 6e 63 6f 6c 6c 61 70 73 |nction u|ncollaps|
|00000cf0| 65 45 6c 65 6d 65 6e 74 | 28 65 6c 65 6d 65 6e 74 |eElement|(element|
|00000d00| 29 20 7b 0a 20 20 20 20 | 65 6c 65 6d 65 6e 74 2e |) {. |element.|
|00000d10| 73 74 79 6c 65 2e 76 69 | 73 69 62 69 6c 69 74 79 |style.vi|sibility|
|00000d20| 20 3d 20 22 22 3b 0a 7d | 0a 0a 66 75 6e 63 74 69 | = "";.}|..functi|
|00000d30| 6f 6e 20 75 70 64 61 74 | 65 55 6e 64 6f 52 65 64 |on updat|eUndoRed|
|00000d40| 6f 4d 65 6e 75 28 29 20 | 7b 0a 20 20 20 20 2f 2f |oMenu() |{. //|
|00000d50| 58 58 58 20 67 69 76 65 | 20 4c 69 67 68 74 6e 69 |XXX give| Lightni|
|00000d60| 6e 67 20 73 6f 6d 65 20 | 75 6e 64 6f 2f 72 65 64 |ng some |undo/red|
|00000d70| 6f 20 55 49 21 0a 7d 0a | 0a 2f 2a 2a 0a 20 2a 20 |o UI!.}.|./**. * |
|00000d80| 47 65 74 73 20 74 68 65 | 20 76 61 6c 75 65 20 6f |Gets the| value o|
|00000d90| 66 20 61 20 73 74 72 69 | 6e 67 20 69 6e 20 61 20 |f a stri|ng in a |
|00000da0| 2e 70 72 6f 70 65 72 74 | 69 65 73 20 66 69 6c 65 |.propert|ies file|
|00000db0| 0a 20 2a 0a 20 2a 20 40 | 70 61 72 61 6d 20 61 42 |. *. * @|param aB|
|00000dc0| 75 6e 64 6c 65 4e 61 6d | 65 20 20 74 68 65 20 6e |undleNam|e the n|
|00000dd0| 61 6d 65 20 6f 66 20 74 | 68 65 20 70 72 6f 70 65 |ame of t|he prope|
|00000de0| 72 74 69 65 73 20 66 69 | 6c 65 2e 20 20 49 74 20 |rties fi|le. It |
|00000df0| 69 73 20 61 73 73 75 6d | 65 64 20 74 68 61 74 20 |is assum|ed that |
|00000e00| 74 68 65 0a 20 2a 20 20 | 20 20 20 20 20 20 20 20 |the. * | |
|00000e10| 20 20 20 20 20 20 20 20 | 20 20 20 66 69 6c 65 20 | | file |
|00000e20| 6c 69 76 65 73 20 69 6e | 20 63 68 72 6f 6d 65 3a |lives in| chrome:|
|00000e30| 2f 2f 6c 69 67 68 74 6e | 69 6e 67 2f 6c 6f 63 61 |//lightn|ing/loca|
|00000e40| 6c 65 2f 0a 20 2a 20 40 | 70 61 72 61 6d 20 61 53 |le/. * @|param aS|
|00000e50| 74 72 69 6e 67 4e 61 6d | 65 20 74 68 65 20 6e 61 |tringNam|e the na|
|00000e60| 6d 65 20 6f 66 20 74 68 | 65 20 73 74 72 69 6e 67 |me of th|e string|
|00000e70| 20 77 69 74 68 69 6e 20 | 74 68 65 20 70 72 6f 70 | within |the prop|
|00000e80| 65 72 74 69 65 73 20 66 | 69 6c 65 0a 20 2a 2f 0a |erties f|ile. */.|
|00000e90| 66 75 6e 63 74 69 6f 6e | 20 6c 74 6e 47 65 74 53 |function| ltnGetS|
|00000ea0| 74 72 69 6e 67 28 61 42 | 75 6e 64 6c 65 4e 61 6d |tring(aB|undleNam|
|00000eb0| 65 2c 20 61 53 74 72 69 | 6e 67 4e 61 6d 65 29 0a |e, aStri|ngName).|
|00000ec0| 7b 0a 20 20 20 20 76 61 | 72 20 73 62 73 20 3d 20 |{. va|r sbs = |
|00000ed0| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 63 6c 61 73 73 |Componen|ts.class|
|00000ee0| 65 73 5b 22 40 6d 6f 7a | 69 6c 6c 61 2e 6f 72 67 |es["@moz|illa.org|
|00000ef0| 2f 69 6e 74 6c 2f 73 74 | 72 69 6e 67 62 75 6e 64 |/intl/st|ringbund|
|00000f00| 6c 65 3b 31 22 5d 0a 20 | 20 20 20 20 20 20 20 20 |le;1"]. | |
|00000f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2e | | .|
|00000f20| 67 65 74 53 65 72 76 69 | 63 65 28 43 6f 6d 70 6f |getServi|ce(Compo|
|00000f30| 6e 65 6e 74 73 2e 69 6e | 74 65 72 66 61 63 65 73 |nents.in|terfaces|
|00000f40| 2e 6e 73 49 53 74 72 69 | 6e 67 42 75 6e 64 6c 65 |.nsIStri|ngBundle|
|00000f50| 53 65 72 76 69 63 65 29 | 3b 0a 20 20 20 20 76 61 |Service)|;. va|
|00000f60| 72 20 70 72 6f 70 73 20 | 3d 20 73 62 73 2e 63 72 |r props |= sbs.cr|
|00000f70| 65 61 74 65 42 75 6e 64 | 6c 65 28 22 63 68 72 6f |eateBund|le("chro|
|00000f80| 6d 65 3a 2f 2f 6c 69 67 | 68 74 6e 69 6e 67 2f 6c |me://lig|htning/l|
|00000f90| 6f 63 61 6c 65 2f 22 2b | 61 42 75 6e 64 6c 65 4e |ocale/"+|aBundleN|
|00000fa0| 61 6d 65 2b 22 2e 70 72 | 6f 70 65 72 74 69 65 73 |ame+".pr|operties|
|00000fb0| 22 29 3b 0a 20 20 20 20 | 72 65 74 75 72 6e 20 70 |");. |return p|
|00000fc0| 72 6f 70 73 2e 47 65 74 | 53 74 72 69 6e 67 46 72 |rops.Get|StringFr|
|00000fd0| 6f 6d 4e 61 6d 65 28 61 | 53 74 72 69 6e 67 4e 61 |omName(a|StringNa|
|00000fe0| 6d 65 29 3b 0a 7d 0a 50 | 4b 03 04 0a 00 00 00 00 |me);.}.P|K.......|
|00000ff0| 00 1a 25 3a 37 dd 25 13 | 42 d0 5b 00 00 d0 5b 00 |..%:7.%.|B.[...[.|
|00001000| 00 2e 00 00 00 63 6f 6e | 74 65 6e 74 2f 6c 69 67 |.....con|tent/lig|
|00001010| 68 74 6e 69 6e 67 2f 6d | 65 73 73 65 6e 67 65 72 |htning/m|essenger|
|00001020| 2d 6f 76 65 72 6c 61 79 | 2d 73 69 64 65 62 61 72 |-overlay|-sidebar|
|00001030| 2e 6a 73 2f 2a 20 2a 2a | 2a 2a 2a 20 42 45 47 49 |.js/* **|*** BEGI|
|00001040| 4e 20 4c 49 43 45 4e 53 | 45 20 42 4c 4f 43 4b 20 |N LICENS|E BLOCK |
|00001050| 2a 2a 2a 2a 2a 0a 20 2a | 20 56 65 72 73 69 6f 6e |*****. *| Version|
|00001060| 3a 20 4d 50 4c 20 31 2e | 31 2f 47 50 4c 20 32 2e |: MPL 1.|1/GPL 2.|
|00001070| 30 2f 4c 47 50 4c 20 32 | 2e 31 0a 20 2a 0a 20 2a |0/LGPL 2|.1. *. *|
|00001080| 20 54 68 65 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 | The con|tents of|
|00001090| 20 74 68 69 73 20 66 69 | 6c 65 20 61 72 65 20 73 | this fi|le are s|
|000010a0| 75 62 6a 65 63 74 20 74 | 6f 20 74 68 65 20 4d 6f |ubject t|o the Mo|
|000010b0| 7a 69 6c 6c 61 20 50 75 | 62 6c 69 63 20 4c 69 63 |zilla Pu|blic Lic|
|000010c0| 65 6e 73 65 20 56 65 72 | 73 69 6f 6e 0a 20 2a 20 |ense Ver|sion. * |
|000010d0| 31 2e 31 20 28 74 68 65 | 20 22 4c 69 63 65 6e 73 |1.1 (the| "Licens|
|000010e0| 65 22 29 3b 20 79 6f 75 | 20 6d 61 79 20 6e 6f 74 |e"); you| may not|
|000010f0| 20 75 73 65 20 74 68 69 | 73 20 66 69 6c 65 20 65 | use thi|s file e|
|00001100| 78 63 65 70 74 20 69 6e | 20 63 6f 6d 70 6c 69 61 |xcept in| complia|
|00001110| 6e 63 65 20 77 69 74 68 | 0a 20 2a 20 74 68 65 20 |nce with|. * the |
|00001120| 4c 69 63 65 6e 73 65 2e | 20 59 6f 75 20 6d 61 79 |License.| You may|
|00001130| 20 6f 62 74 61 69 6e 20 | 61 20 63 6f 70 79 20 6f | obtain |a copy o|
|00001140| 66 20 74 68 65 20 4c 69 | 63 65 6e 73 65 20 61 74 |f the Li|cense at|
|00001150| 0a 20 2a 20 68 74 74 70 | 3a 2f 2f 77 77 77 2e 6d |. * http|://www.m|
|00001160| 6f 7a 69 6c 6c 61 2e 6f | 72 67 2f 4d 50 4c 2f 0a |ozilla.o|rg/MPL/.|
|00001170| 20 2a 0a 20 2a 20 53 6f | 66 74 77 61 72 65 20 64 | *. * So|ftware d|
|00001180| 69 73 74 72 69 62 75 74 | 65 64 20 75 6e 64 65 72 |istribut|ed under|
|00001190| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 20 69 73 20 | the Lic|ense is |
|000011a0| 64 69 73 74 72 69 62 75 | 74 65 64 20 6f 6e 20 61 |distribu|ted on a|
|000011b0| 6e 20 22 41 53 20 49 53 | 22 20 62 61 73 69 73 2c |n "AS IS|" basis,|
|000011c0| 0a 20 2a 20 57 49 54 48 | 4f 55 54 20 57 41 52 52 |. * WITH|OUT WARR|
|000011d0| 41 4e 54 59 20 4f 46 20 | 41 4e 59 20 4b 49 4e 44 |ANTY OF |ANY KIND|
|000011e0| 2c 20 65 69 74 68 65 72 | 20 65 78 70 72 65 73 73 |, either| express|
|000011f0| 20 6f 72 20 69 6d 70 6c | 69 65 64 2e 20 53 65 65 | or impl|ied. See|
|00001200| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 0a 20 2a 20 | the Lic|ense. * |
|00001210| 66 6f 72 20 74 68 65 20 | 73 70 65 63 69 66 69 63 |for the |specific|
|00001220| 20 6c 61 6e 67 75 61 67 | 65 20 67 6f 76 65 72 6e | languag|e govern|
|00001230| 69 6e 67 20 72 69 67 68 | 74 73 20 61 6e 64 20 6c |ing righ|ts and l|
|00001240| 69 6d 69 74 61 74 69 6f | 6e 73 20 75 6e 64 65 72 |imitatio|ns under|
|00001250| 20 74 68 65 0a 20 2a 20 | 4c 69 63 65 6e 73 65 2e | the. * |License.|
|00001260| 0a 20 2a 0a 20 2a 20 54 | 68 65 20 4f 72 69 67 69 |. *. * T|he Origi|
|00001270| 6e 61 6c 20 43 6f 64 65 | 20 69 73 20 4c 69 67 68 |nal Code| is Ligh|
|00001280| 74 6e 69 6e 67 20 63 6f | 64 65 2e 0a 20 2a 0a 20 |tning co|de.. *. |
|00001290| 2a 20 54 68 65 20 49 6e | 69 74 69 61 6c 20 44 65 |* The In|itial De|
|000012a0| 76 65 6c 6f 70 65 72 20 | 6f 66 20 74 68 65 20 4f |veloper |of the O|
|000012b0| 72 69 67 69 6e 61 6c 20 | 43 6f 64 65 20 69 73 20 |riginal |Code is |
|000012c0| 4f 72 61 63 6c 65 20 43 | 6f 72 70 6f 72 61 74 69 |Oracle C|orporati|
|000012d0| 6f 6e 0a 20 2a 20 50 6f | 72 74 69 6f 6e 73 20 63 |on. * Po|rtions c|
|000012e0| 72 65 61 74 65 64 20 62 | 79 20 74 68 65 20 49 6e |reated b|y the In|
|000012f0| 69 74 69 61 6c 20 44 65 | 76 65 6c 6f 70 65 72 20 |itial De|veloper |
|00001300| 61 72 65 20 43 6f 70 79 | 72 69 67 68 74 20 28 43 |are Copy|right (C|
|00001310| 29 20 32 30 30 35 0a 20 | 2a 20 74 68 65 20 49 6e |) 2005. |* the In|
|00001320| 69 74 69 61 6c 20 44 65 | 76 65 6c 6f 70 65 72 2e |itial De|veloper.|
|00001330| 20 41 6c 6c 20 52 69 67 | 68 74 73 20 52 65 73 65 | All Rig|hts Rese|
|00001340| 72 76 65 64 2e 0a 20 2a | 0a 20 2a 20 43 6f 6e 74 |rved.. *|. * Cont|
|00001350| 72 69 62 75 74 6f 72 28 | 73 29 3a 0a 20 2a 20 20 |ributor(|s):. * |
|00001360| 20 4d 69 6b 65 20 53 68 | 61 76 65 72 20 3c 73 68 | Mike Sh|aver <sh|
|00001370| 61 76 65 72 40 6d 6f 7a | 69 6c 6c 61 2e 6f 72 67 |aver@moz|illa.org|
|00001380| 3e 0a 20 2a 20 20 20 56 | 6c 61 64 69 6d 69 72 20 |>. * V|ladimir |
|00001390| 56 75 6b 69 63 65 76 69 | 63 20 3c 76 6c 61 64 69 |Vukicevi|c <vladi|
|000013a0| 6d 69 72 40 70 6f 62 6f | 78 2e 63 6f 6d 3e 0a 20 |mir@pobo|x.com>. |
|000013b0| 2a 20 20 20 53 74 75 61 | 72 74 20 50 61 72 6d 65 |* Stua|rt Parme|
|000013c0| 6e 74 65 72 20 3c 73 74 | 75 61 72 74 2e 70 61 72 |nter <st|uart.par|
|000013d0| 6d 65 6e 74 65 72 40 6f | 72 61 63 6c 65 2e 63 6f |menter@o|racle.co|
|000013e0| 6d 3e 0a 20 2a 20 20 20 | 44 61 6e 20 4d 6f 73 65 |m>. * |Dan Mose|
|000013f0| 64 61 6c 65 20 3c 64 6d | 6f 73 65 40 6d 6f 7a 69 |dale <dm|ose@mozi|
|00001400| 6c 6c 61 2e 6f 72 67 3e | 0a 20 2a 20 20 20 4a 6f |lla.org>|. * Jo|
|00001410| 65 79 20 4d 69 6e 74 61 | 20 3c 6a 6d 69 6e 74 61 |ey Minta| <jminta|
|00001420| 40 67 6d 61 69 6c 2e 63 | 6f 6d 3e 0a 20 2a 20 20 |@gmail.c|om>. * |
|00001430| 20 53 69 6d 6f 6e 20 50 | 61 71 75 65 74 20 3c 62 | Simon P|aquet <b|
|00001440| 75 67 7a 69 6c 6c 61 40 | 62 61 62 79 6c 6f 6e 73 |ugzilla@|babylons|
|00001450| 6f 75 6e 64 73 2e 63 6f | 6d 3e 0a 20 2a 20 20 20 |ounds.co|m>. * |
|00001460| 53 74 65 66 61 6e 20 53 | 69 74 74 65 72 20 3c 73 |Stefan S|itter <s|
|00001470| 73 69 74 74 65 72 40 67 | 6f 6f 67 6c 65 6d 61 69 |sitter@g|ooglemai|
|00001480| 6c 2e 63 6f 6d 3e 0a 20 | 2a 20 20 20 54 68 6f 6d |l.com>. |* Thom|
|00001490| 61 73 20 42 65 6e 69 73 | 63 68 20 3c 74 68 6f 6d |as Benis|ch <thom|
|000014a0| 61 73 2e 62 65 6e 69 73 | 63 68 40 73 75 6e 2e 63 |as.benis|ch@sun.c|
|000014b0| 6f 6d 3e 0a 20 2a 20 20 | 20 4d 69 63 68 61 65 6c |om>. * | Michael|
|000014c0| 20 42 75 65 74 74 6e 65 | 72 20 3c 6d 69 63 68 61 | Buettne|r <micha|
|000014d0| 65 6c 2e 62 75 65 74 74 | 6e 65 72 40 73 75 6e 2e |el.buett|ner@sun.|
|000014e0| 63 6f 6d 3e 0a 20 2a 20 | 20 20 50 68 69 6c 69 70 |com>. * | Philip|
|000014f0| 70 20 4b 65 77 69 73 63 | 68 20 3c 6d 6f 7a 69 6c |p Kewisc|h <mozil|
|00001500| 6c 61 40 6b 65 77 69 73 | 2e 63 68 3e 0a 20 2a 20 |la@kewis|.ch>. * |
|00001510| 20 20 42 65 72 65 6e 64 | 20 43 6f 72 6e 65 6c 69 | Berend| Corneli|
|00001520| 75 73 20 3c 62 65 72 65 | 6e 64 2e 63 6f 72 6e 65 |us <bere|nd.corne|
|00001530| 6c 69 75 73 40 73 75 6e | 2e 63 6f 6d 3e 0a 20 2a |lius@sun|.com>. *|
|00001540| 0a 20 2a 20 41 6c 74 65 | 72 6e 61 74 69 76 65 6c |. * Alte|rnativel|
|00001550| 79 2c 20 74 68 65 20 63 | 6f 6e 74 65 6e 74 73 20 |y, the c|ontents |
|00001560| 6f 66 20 74 68 69 73 20 | 66 69 6c 65 20 6d 61 79 |of this |file may|
|00001570| 20 62 65 20 75 73 65 64 | 20 75 6e 64 65 72 20 74 | be used| under t|
|00001580| 68 65 20 74 65 72 6d 73 | 20 6f 66 0a 20 2a 20 65 |he terms| of. * e|
|00001590| 69 74 68 65 72 20 74 68 | 65 20 47 4e 55 20 47 65 |ither th|e GNU Ge|
|000015a0| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|000015b0| 65 6e 73 65 20 56 65 72 | 73 69 6f 6e 20 32 20 6f |ense Ver|sion 2 o|
|000015c0| 72 20 6c 61 74 65 72 20 | 28 74 68 65 20 22 47 50 |r later |(the "GP|
|000015d0| 4c 22 29 2c 20 6f 72 20 | 0a 20 2a 20 74 68 65 20 |L"), or |. * the |
|000015e0| 47 4e 55 20 4c 65 73 73 | 65 72 20 47 65 6e 65 72 |GNU Less|er Gener|
|000015f0| 61 6c 20 50 75 62 6c 69 | 63 20 4c 69 63 65 6e 73 |al Publi|c Licens|
|00001600| 65 20 56 65 72 73 69 6f | 6e 20 32 2e 31 20 6f 72 |e Versio|n 2.1 or|
|00001610| 20 6c 61 74 65 72 20 28 | 74 68 65 20 22 4c 47 50 | later (|the "LGP|
|00001620| 4c 22 29 2c 0a 20 2a 20 | 69 6e 20 77 68 69 63 68 |L"),. * |in which|
|00001630| 20 63 61 73 65 20 74 68 | 65 20 70 72 6f 76 69 73 | case th|e provis|
|00001640| 69 6f 6e 73 20 6f 66 20 | 74 68 65 20 47 50 4c 20 |ions of |the GPL |
|00001650| 6f 72 20 74 68 65 20 4c | 47 50 4c 20 61 72 65 20 |or the L|GPL are |
|00001660| 61 70 70 6c 69 63 61 62 | 6c 65 20 69 6e 73 74 65 |applicab|le inste|
|00001670| 61 64 0a 20 2a 20 6f 66 | 20 74 68 6f 73 65 20 61 |ad. * of| those a|
|00001680| 62 6f 76 65 2e 20 49 66 | 20 79 6f 75 20 77 69 73 |bove. If| you wis|
|00001690| 68 20 74 6f 20 61 6c 6c | 6f 77 20 75 73 65 20 6f |h to all|ow use o|
|000016a0| 66 20 79 6f 75 72 20 76 | 65 72 73 69 6f 6e 20 6f |f your v|ersion o|
|000016b0| 66 20 74 68 69 73 20 66 | 69 6c 65 20 6f 6e 6c 79 |f this f|ile only|
|000016c0| 0a 20 2a 20 75 6e 64 65 | 72 20 74 68 65 20 74 65 |. * unde|r the te|
|000016d0| 72 6d 73 20 6f 66 20 65 | 69 74 68 65 72 20 74 68 |rms of e|ither th|
|000016e0| 65 20 47 50 4c 20 6f 72 | 20 74 68 65 20 4c 47 50 |e GPL or| the LGP|
|000016f0| 4c 2c 20 61 6e 64 20 6e | 6f 74 20 74 6f 20 61 6c |L, and n|ot to al|
|00001700| 6c 6f 77 20 6f 74 68 65 | 72 73 20 74 6f 0a 20 2a |low othe|rs to. *|
|00001710| 20 75 73 65 20 79 6f 75 | 72 20 76 65 72 73 69 6f | use you|r versio|
|00001720| 6e 20 6f 66 20 74 68 69 | 73 20 66 69 6c 65 20 75 |n of thi|s file u|
|00001730| 6e 64 65 72 20 74 68 65 | 20 74 65 72 6d 73 20 6f |nder the| terms o|
|00001740| 66 20 74 68 65 20 4d 50 | 4c 2c 20 69 6e 64 69 63 |f the MP|L, indic|
|00001750| 61 74 65 20 79 6f 75 72 | 0a 20 2a 20 64 65 63 69 |ate your|. * deci|
|00001760| 73 69 6f 6e 20 62 79 20 | 64 65 6c 65 74 69 6e 67 |sion by |deleting|
|00001770| 20 74 68 65 20 70 72 6f | 76 69 73 69 6f 6e 73 20 | the pro|visions |
|00001780| 61 62 6f 76 65 20 61 6e | 64 20 72 65 70 6c 61 63 |above an|d replac|
|00001790| 65 20 74 68 65 6d 20 77 | 69 74 68 20 74 68 65 20 |e them w|ith the |
|000017a0| 6e 6f 74 69 63 65 0a 20 | 2a 20 61 6e 64 20 6f 74 |notice. |* and ot|
|000017b0| 68 65 72 20 70 72 6f 76 | 69 73 69 6f 6e 73 20 72 |her prov|isions r|
|000017c0| 65 71 75 69 72 65 64 20 | 62 79 20 74 68 65 20 47 |equired |by the G|
|000017d0| 50 4c 20 6f 72 20 74 68 | 65 20 4c 47 50 4c 2e 20 |PL or th|e LGPL. |
|000017e0| 49 66 20 79 6f 75 20 64 | 6f 20 6e 6f 74 20 64 65 |If you d|o not de|
|000017f0| 6c 65 74 65 0a 20 2a 20 | 74 68 65 20 70 72 6f 76 |lete. * |the prov|
|00001800| 69 73 69 6f 6e 73 20 61 | 62 6f 76 65 2c 20 61 20 |isions a|bove, a |
|00001810| 72 65 63 69 70 69 65 6e | 74 20 6d 61 79 20 75 73 |recipien|t may us|
|00001820| 65 20 79 6f 75 72 20 76 | 65 72 73 69 6f 6e 20 6f |e your v|ersion o|
|00001830| 66 20 74 68 69 73 20 66 | 69 6c 65 20 75 6e 64 65 |f this f|ile unde|
|00001840| 72 0a 20 2a 20 74 68 65 | 20 74 65 72 6d 73 20 6f |r. * the| terms o|
|00001850| 66 20 61 6e 79 20 6f 6e | 65 20 6f 66 20 74 68 65 |f any on|e of the|
|00001860| 20 4d 50 4c 2c 20 74 68 | 65 20 47 50 4c 20 6f 72 | MPL, th|e GPL or|
|00001870| 20 74 68 65 20 4c 47 50 | 4c 2e 0a 20 2a 0a 20 2a | the LGP|L.. *. *|
|00001880| 20 2a 2a 2a 2a 2a 20 45 | 4e 44 20 4c 49 43 45 4e | ***** E|ND LICEN|
|00001890| 53 45 20 42 4c 4f 43 4b | 20 2a 2a 2a 2a 2a 20 2a |SE BLOCK| ***** *|
|000018a0| 2f 0a 0a 76 61 72 20 67 | 4c 61 73 74 53 68 6f 77 |/..var g|LastShow|
|000018b0| 6e 43 61 6c 65 6e 64 61 | 72 56 69 65 77 20 3d 20 |nCalenda|rView = |
|000018c0| 6e 75 6c 6c 3b 0a 0a 76 | 61 72 20 43 61 6c 65 6e |null;..v|ar Calen|
|000018d0| 64 61 72 43 6f 6e 74 72 | 6f 6c 6c 65 72 20 3d 0a |darContr|oller =.|
|000018e0| 7b 0a 20 20 64 65 66 61 | 75 6c 74 43 6f 6e 74 72 |{. defa|ultContr|
|000018f0| 6f 6c 6c 65 72 3a 20 6e | 75 6c 6c 2c 0a 0a 20 20 |oller: n|ull,.. |
|00001900| 73 75 70 70 6f 72 74 73 | 43 6f 6d 6d 61 6e 64 3a |supports|Command:|
|00001910| 20 66 75 6e 63 74 69 6f | 6e 20 63 63 53 43 28 63 | functio|n ccSC(c|
|00001920| 6f 6d 6d 61 6e 64 29 20 | 7b 0a 20 20 20 20 73 77 |ommand) |{. sw|
|00001930| 69 74 63 68 20 28 63 6f | 6d 6d 61 6e 64 29 20 7b |itch (co|mmand) {|
|00001940| 0a 20 20 20 20 20 20 63 | 61 73 65 20 22 63 6d 64 |. c|ase "cmd|
|00001950| 5f 63 75 74 22 3a 0a 20 | 20 20 20 20 20 63 61 73 |_cut":. | cas|
|00001960| 65 20 22 63 6d 64 5f 63 | 6f 70 79 22 3a 0a 20 20 |e "cmd_c|opy":. |
|00001970| 20 20 20 20 63 61 73 65 | 20 22 63 6d 64 5f 70 61 | case| "cmd_pa|
|00001980| 73 74 65 22 3a 0a 20 20 | 20 20 20 20 63 61 73 65 |ste":. | case|
|00001990| 20 22 63 6d 64 5f 75 6e | 64 6f 22 3a 0a 20 20 20 | "cmd_un|do":. |
|000019a0| 20 20 20 63 61 73 65 20 | 22 63 6d 64 5f 72 65 64 | case |"cmd_red|
|000019b0| 6f 22 3a 0a 20 20 20 20 | 20 20 63 61 73 65 20 22 |o":. | case "|
|000019c0| 63 6d 64 5f 70 72 69 6e | 74 22 3a 0a 20 20 20 20 |cmd_prin|t":. |
|000019d0| 20 20 63 61 73 65 20 22 | 63 6d 64 5f 70 72 69 6e | case "|cmd_prin|
|000019e0| 74 70 72 65 76 69 65 77 | 22 3a 0a 20 20 20 20 20 |tpreview|":. |
|000019f0| 20 63 61 73 65 20 22 62 | 75 74 74 6f 6e 5f 70 72 | case "b|utton_pr|
|00001a00| 69 6e 74 22 3a 0a 20 20 | 20 20 20 20 63 61 73 65 |int":. | case|
|00001a10| 20 22 62 75 74 74 6f 6e | 5f 64 65 6c 65 74 65 22 | "button|_delete"|
|00001a20| 3a 0a 20 20 20 20 20 20 | 63 61 73 65 20 22 63 6d |:. |case "cm|
|00001a30| 64 5f 64 65 6c 65 74 65 | 22 3a 0a 20 20 20 20 20 |d_delete|":. |
|00001a40| 20 20 20 72 65 74 75 72 | 6e 20 74 72 75 65 3b 0a | retur|n true;.|
|00001a50| 20 20 20 20 7d 0a 20 20 | 20 20 69 66 20 28 74 68 | }. | if (th|
|00001a60| 69 73 2e 64 65 66 61 75 | 6c 74 43 6f 6e 74 72 6f |is.defau|ltContro|
|00001a70| 6c 6c 65 72 29 20 7b 0a | 20 20 20 20 20 20 72 65 |ller) {.| re|
|00001a80| 74 75 72 6e 20 74 68 69 | 73 2e 64 65 66 61 75 6c |turn thi|s.defaul|
|00001a90| 74 43 6f 6e 74 72 6f 6c | 6c 65 72 2e 73 75 70 70 |tControl|ler.supp|
|00001aa0| 6f 72 74 73 43 6f 6d 6d | 61 6e 64 28 63 6f 6d 6d |ortsComm|and(comm|
|00001ab0| 61 6e 64 29 3b 0a 20 20 | 20 20 7d 0a 20 20 20 20 |and);. | }. |
|00001ac0| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0a 20 20 |return f|alse;. |
|00001ad0| 7d 2c 0a 0a 20 20 69 73 | 43 6f 6d 6d 61 6e 64 45 |},.. is|CommandE|
|00001ae0| 6e 61 62 6c 65 64 3a 20 | 66 75 6e 63 74 69 6f 6e |nabled: |function|
|00001af0| 20 63 63 49 43 45 28 63 | 6f 6d 6d 61 6e 64 29 20 | ccICE(c|ommand) |
|00001b00| 7b 0a 20 20 20 20 73 77 | 69 74 63 68 20 28 63 6f |{. sw|itch (co|
|00001b10| 6d 6d 61 6e 64 29 20 7b | 0a 20 20 20 20 20 20 63 |mmand) {|. c|
|00001b20| 61 73 65 20 22 63 6d 64 | 5f 63 75 74 22 3a 0a 20 |ase "cmd|_cut":. |
|00001b30| 20 20 20 20 20 63 61 73 | 65 20 22 63 6d 64 5f 63 | cas|e "cmd_c|
|00001b40| 6f 70 79 22 3a 0a 20 20 | 20 20 20 20 20 20 72 65 |opy":. | re|
|00001b50| 74 75 72 6e 20 63 75 72 | 72 65 6e 74 56 69 65 77 |turn cur|rentView|
|00001b60| 28 29 2e 67 65 74 53 65 | 6c 65 63 74 65 64 49 74 |().getSe|lectedIt|
|00001b70| 65 6d 73 28 7b 7d 29 2e | 6c 65 6e 67 74 68 20 21 |ems({}).|length !|
|00001b80| 3d 20 30 3b 0a 20 20 20 | 20 20 20 63 61 73 65 20 |= 0;. | case |
|00001b90| 22 63 6d 64 5f 70 61 73 | 74 65 22 3a 0a 20 20 20 |"cmd_pas|te":. |
|00001ba0| 20 20 20 20 20 72 65 74 | 75 72 6e 20 63 61 6e 50 | ret|urn canP|
|00001bb0| 61 73 74 65 28 29 3b 0a | 20 20 20 20 20 20 63 61 |aste();.| ca|
|00001bc0| 73 65 20 22 63 6d 64 5f | 75 6e 64 6f 22 3a 0a 20 |se "cmd_|undo":. |
|00001bd0| 20 20 20 20 20 20 20 69 | 66 20 28 74 68 69 73 2e | i|f (this.|
|00001be0| 69 73 43 61 6c 65 6e 64 | 61 72 49 6e 46 6f 72 65 |isCalend|arInFore|
|00001bf0| 67 72 6f 75 6e 64 28 29 | 29 20 7b 0a 20 20 20 20 |ground()|) {. |
|00001c00| 20 20 20 20 20 20 67 6f | 53 65 74 4d 65 6e 75 56 | go|SetMenuV|
|00001c10| 61 6c 75 65 28 63 6f 6d | 6d 61 6e 64 2c 20 27 76 |alue(com|mand, 'v|
|00001c20| 61 6c 75 65 44 65 66 61 | 75 6c 74 27 29 3b 0a 20 |alueDefa|ult');. |
|00001c30| 20 20 20 20 20 20 20 20 | 20 69 66 20 28 63 61 6e | | if (can|
|00001c40| 55 6e 64 6f 28 29 29 20 | 7b 0a 20 20 20 20 20 20 |Undo()) |{. |
|00001c50| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 74 72 75 | re|turn tru|
|00001c60| 65 3b 0a 20 20 20 20 20 | 20 20 20 20 20 7d 0a 20 |e;. | }. |
|00001c70| 20 20 20 20 20 20 20 7d | 0a 20 20 20 20 20 20 20 | }|. |
|00001c80| 20 62 72 65 61 6b 3b 0a | 20 20 20 20 20 20 63 61 | break;.| ca|
|00001c90| 73 65 20 22 63 6d 64 5f | 72 65 64 6f 22 3a 0a 20 |se "cmd_|redo":. |
|00001ca0| 20 20 20 20 20 20 20 69 | 66 20 28 74 68 69 73 2e | i|f (this.|
|00001cb0| 69 73 43 61 6c 65 6e 64 | 61 72 49 6e 46 6f 72 65 |isCalend|arInFore|
|00001cc0| 67 72 6f 75 6e 64 28 29 | 29 20 7b 0a 20 20 20 20 |ground()|) {. |
|00001cd0| 20 20 20 20 20 20 67 6f | 53 65 74 4d 65 6e 75 56 | go|SetMenuV|
|00001ce0| 61 6c 75 65 28 63 6f 6d | 6d 61 6e 64 2c 20 27 76 |alue(com|mand, 'v|
|00001cf0| 61 6c 75 65 44 65 66 61 | 75 6c 74 27 29 3b 0a 20 |alueDefa|ult');. |
|00001d00| 20 20 20 20 20 20 20 20 | 20 69 66 28 63 61 6e 52 | | if(canR|
|00001d10| 65 64 6f 28 29 29 20 7b | 0a 20 20 20 20 20 20 20 |edo()) {|. |
|00001d20| 20 20 20 20 20 72 65 74 | 75 72 6e 20 74 72 75 65 | ret|urn true|
|00001d30| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 7d 0a 20 20 |;. | }. |
|00001d40| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 20 20 | }.| |
|00001d50| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 63 61 73 |break;. | cas|
|00001d60| 65 20 22 62 75 74 74 6f | 6e 5f 70 72 69 6e 74 22 |e "butto|n_print"|
|00001d70| 3a 0a 20 20 20 20 20 20 | 63 61 73 65 20 22 63 6d |:. |case "cm|
|00001d80| 64 5f 70 72 69 6e 74 22 | 3a 0a 20 20 20 20 20 20 |d_print"|:. |
|00001d90| 20 20 69 66 20 28 74 68 | 69 73 2e 69 73 43 61 6c | if (th|is.isCal|
|00001da0| 65 6e 64 61 72 49 6e 46 | 6f 72 65 67 72 6f 75 6e |endarInF|oregroun|
|00001db0| 64 28 29 29 20 7b 0a 20 | 20 20 20 20 20 20 20 20 |d()) {. | |
|00001dc0| 20 72 65 74 75 72 6e 20 | 74 72 75 65 3b 0a 20 20 | return |true;. |
|00001dd0| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 20 20 | }.| |
|00001de0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 63 61 73 |break;. | cas|
|00001df0| 65 20 22 63 6d 64 5f 70 | 72 69 6e 74 70 72 65 76 |e "cmd_p|rintprev|
|00001e00| 69 65 77 22 3a 0a 20 20 | 20 20 20 20 20 20 69 66 |iew":. | if|
|00001e10| 20 28 74 68 69 73 2e 69 | 73 43 61 6c 65 6e 64 61 | (this.i|sCalenda|
|00001e20| 72 49 6e 46 6f 72 65 67 | 72 6f 75 6e 64 28 29 29 |rInForeg|round())|
|00001e30| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 72 65 74 | {. | ret|
|00001e40| 75 72 6e 20 66 61 6c 73 | 65 3b 0a 20 20 20 20 20 |urn fals|e;. |
|00001e50| 20 20 20 7d 0a 20 20 20 | 20 20 20 20 20 62 72 65 | }. | bre|
|00001e60| 61 6b 3b 0a 20 20 20 20 | 20 20 63 61 73 65 20 22 |ak;. | case "|
|00001e70| 62 75 74 74 6f 6e 5f 64 | 65 6c 65 74 65 22 3a 0a |button_d|elete":.|
|00001e80| 20 20 20 20 20 20 63 61 | 73 65 20 22 63 6d 64 5f | ca|se "cmd_|
|00001e90| 64 65 6c 65 74 65 22 3a | 0a 20 20 20 20 20 20 20 |delete":|. |
|00001ea0| 20 69 66 20 28 74 68 69 | 73 2e 69 73 43 61 6c 65 | if (thi|s.isCale|
|00001eb0| 6e 64 61 72 49 6e 46 6f | 72 65 67 72 6f 75 6e 64 |ndarInFo|reground|
|00001ec0| 28 29 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 |()) {. | |
|00001ed0| 76 61 72 20 73 65 6c 65 | 63 74 65 64 49 74 65 6d |var sele|ctedItem|
|00001ee0| 73 20 3d 20 63 75 72 72 | 65 6e 74 56 69 65 77 28 |s = curr|entView(|
|00001ef0| 29 2e 67 65 74 53 65 6c | 65 63 74 65 64 49 74 65 |).getSel|ectedIte|
|00001f00| 6d 73 28 7b 7d 29 3b 0a | 20 20 20 20 20 20 20 20 |ms({});.| |
|00001f10| 20 20 72 65 74 75 72 6e | 20 73 65 6c 65 63 74 65 | return| selecte|
|00001f20| 64 49 74 65 6d 73 2e 6c | 65 6e 67 74 68 20 21 3d |dItems.l|ength !=|
|00001f30| 20 30 3b 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 | 0;. | }. |
|00001f40| 20 20 20 20 20 20 62 72 | 65 61 6b 3b 0a 20 20 20 | br|eak;. |
|00001f50| 20 7d 0a 20 20 20 20 69 | 66 20 28 74 68 69 73 2e | }. i|f (this.|
|00001f60| 64 65 66 61 75 6c 74 43 | 6f 6e 74 72 6f 6c 6c 65 |defaultC|ontrolle|
|00001f70| 72 29 20 7b 0a 20 20 20 | 20 20 20 72 65 74 75 72 |r) {. | retur|
|00001f80| 6e 20 74 68 69 73 2e 64 | 65 66 61 75 6c 74 43 6f |n this.d|efaultCo|
|00001f90| 6e 74 72 6f 6c 6c 65 72 | 2e 69 73 43 6f 6d 6d 61 |ntroller|.isComma|
|00001fa0| 6e 64 45 6e 61 62 6c 65 | 64 28 63 6f 6d 6d 61 6e |ndEnable|d(comman|
|00001fb0| 64 29 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 72 65 |d);. |}. re|
|00001fc0| 74 75 72 6e 20 66 61 6c | 73 65 3b 0a 20 20 7d 2c |turn fal|se;. },|
|00001fd0| 0a 0a 20 20 64 6f 43 6f | 6d 6d 61 6e 64 3a 20 66 |.. doCo|mmand: f|
|00001fe0| 75 6e 63 74 69 6f 6e 20 | 63 63 44 43 28 63 6f 6d |unction |ccDC(com|
|00001ff0| 6d 61 6e 64 29 20 7b 0a | 20 20 20 20 2f 2f 20 69 |mand) {.| // i|
|00002000| 66 20 74 68 65 20 75 73 | 65 72 20 69 6e 76 6f 6b |f the us|er invok|
|00002010| 65 64 20 61 20 6b 65 79 | 20 73 68 6f 72 74 20 63 |ed a key| short c|
|00002020| 75 74 20 74 68 65 6e 20 | 69 74 20 69 73 20 70 6f |ut then |it is po|
|00002030| 73 73 69 62 6c 65 20 74 | 68 61 74 20 77 65 20 67 |ssible t|hat we g|
|00002040| 6f 74 0a 20 20 20 20 2f | 2f 20 68 65 72 65 20 66 |ot. /|/ here f|
|00002050| 6f 72 20 61 20 63 6f 6d | 6d 61 6e 64 20 77 68 69 |or a com|mand whi|
|00002060| 63 68 20 69 73 20 72 65 | 61 6c 6c 79 20 64 69 73 |ch is re|ally dis|
|00002070| 61 62 6c 65 64 2e 20 6b | 69 63 6b 20 6f 75 74 20 |abled. k|ick out |
|00002080| 69 66 20 74 68 65 0a 20 | 20 20 20 2f 2f 20 63 6f |if the. | // co|
|00002090| 6d 6d 61 6e 64 20 73 68 | 6f 75 6c 64 20 62 65 20 |mmand sh|ould be |
|000020a0| 64 69 73 61 62 6c 65 64 | 2e 0a 20 20 20 20 69 66 |disabled|.. if|
|000020b0| 20 28 21 74 68 69 73 2e | 69 73 43 6f 6d 6d 61 6e | (!this.|isComman|
|000020c0| 64 45 6e 61 62 6c 65 64 | 28 63 6f 6d 6d 61 6e 64 |dEnabled|(command|
|000020d0| 29 29 20 7b 0a 20 20 20 | 20 20 20 72 65 74 75 72 |)) {. | retur|
|000020e0| 6e 3b 0a 20 20 20 20 7d | 0a 0a 20 20 20 20 73 77 |n;. }|.. sw|
|000020f0| 69 74 63 68 20 28 20 63 | 6f 6d 6d 61 6e 64 20 29 |itch ( c|ommand )|
|00002100| 0a 20 20 20 20 7b 0a 20 | 20 20 20 20 20 63 61 73 |. {. | cas|
|00002110| 65 20 22 63 6d 64 5f 63 | 75 74 22 3a 0a 20 20 20 |e "cmd_c|ut":. |
|00002120| 20 20 20 20 20 63 75 74 | 54 6f 43 6c 69 70 62 6f | cut|ToClipbo|
|00002130| 61 72 64 28 29 3b 0a 20 | 20 20 20 20 20 20 20 62 |ard();. | b|
|00002140| 72 65 61 6b 3b 0a 20 20 | 20 20 20 20 63 61 73 65 |reak;. | case|
|00002150| 20 22 63 6d 64 5f 63 6f | 70 79 22 3a 0a 20 20 20 | "cmd_co|py":. |
|00002160| 20 20 20 20 20 63 6f 70 | 79 54 6f 43 6c 69 70 62 | cop|yToClipb|
|00002170| 6f 61 72 64 28 29 3b 0a | 20 20 20 20 20 20 20 20 |oard();.| |
|00002180| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 63 61 73 |break;. | cas|
|00002190| 65 20 22 63 6d 64 5f 70 | 61 73 74 65 22 3a 0a 20 |e "cmd_p|aste":. |
|000021a0| 20 20 20 20 20 20 20 70 | 61 73 74 65 46 72 6f 6d | p|asteFrom|
|000021b0| 43 6c 69 70 62 6f 61 72 | 64 28 29 3b 0a 20 20 20 |Clipboar|d();. |
|000021c0| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 | bre|ak;. |
|000021d0| 20 20 63 61 73 65 20 22 | 63 6d 64 5f 75 6e 64 6f | case "|cmd_undo|
|000021e0| 22 3a 0a 20 20 20 20 20 | 20 20 20 69 66 20 28 74 |":. | if (t|
|000021f0| 68 69 73 2e 69 73 43 61 | 6c 65 6e 64 61 72 49 6e |his.isCa|lendarIn|
|00002200| 46 6f 72 65 67 72 6f 75 | 6e 64 28 29 20 26 26 20 |Foregrou|nd() && |
|00002210| 63 61 6e 55 6e 64 6f 28 | 29 29 20 7b 0a 20 20 20 |canUndo(|)) {. |
|00002220| 20 20 20 20 20 20 20 67 | 65 74 54 72 61 6e 73 61 | g|etTransa|
|00002230| 63 74 69 6f 6e 4d 67 72 | 28 29 2e 75 6e 64 6f 28 |ctionMgr|().undo(|
|00002240| 29 3b 0a 20 20 20 20 20 | 20 20 20 7d 0a 20 20 20 |);. | }. |
|00002250| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 | bre|ak;. |
|00002260| 20 20 63 61 73 65 20 22 | 63 6d 64 5f 72 65 64 6f | case "|cmd_redo|
|00002270| 22 3a 0a 20 20 20 20 20 | 20 20 20 69 66 20 28 74 |":. | if (t|
|00002280| 68 69 73 2e 69 73 43 61 | 6c 65 6e 64 61 72 49 6e |his.isCa|lendarIn|
|00002290| 46 6f 72 65 67 72 6f 75 | 6e 64 28 29 20 26 26 20 |Foregrou|nd() && |
|000022a0| 63 61 6e 52 65 64 6f 28 | 29 29 20 7b 0a 20 20 20 |canRedo(|)) {. |
|000022b0| 20 20 20 20 20 20 20 67 | 65 74 54 72 61 6e 73 61 | g|etTransa|
|000022c0| 63 74 69 6f 6e 4d 67 72 | 28 29 2e 72 65 64 6f 28 |ctionMgr|().redo(|
|000022d0| 29 3b 0a 20 20 20 20 20 | 20 20 20 7d 0a 20 20 20 |);. | }. |
|000022e0| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 | bre|ak;. |
|000022f0| 20 20 63 61 73 65 20 22 | 62 75 74 74 6f 6e 5f 70 | case "|button_p|
|00002300| 72 69 6e 74 22 3a 0a 20 | 20 20 20 20 20 63 61 73 |rint":. | cas|
|00002310| 65 20 22 63 6d 64 5f 70 | 72 69 6e 74 22 3a 0a 20 |e "cmd_p|rint":. |
|00002320| 20 20 20 20 20 20 20 69 | 66 20 28 74 68 69 73 2e | i|f (this.|
|00002330| 69 73 43 61 6c 65 6e 64 | 61 72 49 6e 46 6f 72 65 |isCalend|arInFore|
|00002340| 67 72 6f 75 6e 64 28 29 | 29 20 7b 0a 20 20 20 20 |ground()|) {. |
|00002350| 20 20 20 20 20 20 63 61 | 6c 50 72 69 6e 74 28 29 | ca|lPrint()|
|00002360| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 72 65 74 75 |;. | retu|
|00002370| 72 6e 3b 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 |rn;. | }. |
|00002380| 20 20 20 20 20 20 62 72 | 65 61 6b 3b 0a 20 20 20 | br|eak;. |
|00002390| 20 20 20 63 61 73 65 20 | 22 63 6d 64 5f 70 72 69 | case |"cmd_pri|
|000023a0| 6e 74 70 72 65 76 69 65 | 77 22 3a 0a 20 20 20 20 |ntprevie|w":. |
|000023b0| 20 20 20 20 69 66 20 28 | 74 68 69 73 2e 69 73 43 | if (|this.isC|
|000023c0| 61 6c 65 6e 64 61 72 49 | 6e 46 6f 72 65 67 72 6f |alendarI|nForegro|
|000023d0| 75 6e 64 28 29 29 20 7b | 0a 20 20 20 20 20 20 20 |und()) {|. |
|000023e0| 20 20 20 72 65 74 75 72 | 6e 3b 0a 20 20 20 20 20 | retur|n;. |
|000023f0| 20 20 20 7d 0a 20 20 20 | 20 20 20 20 20 62 72 65 | }. | bre|
|00002400| 61 6b 3b 0a 20 20 20 20 | 20 20 63 61 73 65 20 22 |ak;. | case "|
|00002410| 62 75 74 74 6f 6e 5f 64 | 65 6c 65 74 65 22 3a 0a |button_d|elete":.|
|00002420| 20 20 20 20 20 20 63 61 | 73 65 20 22 63 6d 64 5f | ca|se "cmd_|
|00002430| 64 65 6c 65 74 65 22 3a | 0a 20 20 20 20 20 20 20 |delete":|. |
|00002440| 20 69 66 20 28 74 68 69 | 73 2e 69 73 43 61 6c 65 | if (thi|s.isCale|
|00002450| 6e 64 61 72 49 6e 46 6f | 72 65 67 72 6f 75 6e 64 |ndarInFo|reground|
|00002460| 28 29 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 |()) {. | |
|00002470| 72 65 74 75 72 6e 3b 0a | 20 20 20 20 20 20 20 20 |return;.| |
|00002480| 7d 0a 20 20 20 20 20 20 | 20 20 62 72 65 61 6b 3b |}. | break;|
|00002490| 0a 20 20 20 20 7d 0a 20 | 20 20 20 69 66 20 28 74 |. }. | if (t|
|000024a0| 68 69 73 2e 64 65 66 61 | 75 6c 74 43 6f 6e 74 72 |his.defa|ultContr|
|000024b0| 6f 6c 6c 65 72 29 20 7b | 0a 20 20 20 20 20 20 74 |oller) {|. t|
|000024c0| 68 69 73 2e 64 65 66 61 | 75 6c 74 43 6f 6e 74 72 |his.defa|ultContr|
|000024d0| 6f 6c 6c 65 72 2e 64 6f | 43 6f 6d 6d 61 6e 64 28 |oller.do|Command(|
|000024e0| 63 6f 6d 6d 61 6e 64 29 | 3b 0a 20 20 20 20 7d 0a |command)|;. }.|
|000024f0| 20 20 7d 2c 0a 0a 20 20 | 6f 6e 45 76 65 6e 74 3a | },.. |onEvent:|
|00002500| 20 66 75 6e 63 74 69 6f | 6e 20 63 63 4f 45 28 65 | functio|n ccOE(e|
|00002510| 76 65 6e 74 29 20 7b 0a | 20 20 20 20 2f 2f 20 64 |vent) {.| // d|
|00002520| 6f 20 6e 6f 74 68 69 6e | 67 20 68 65 72 65 2e 2e |o nothin|g here..|
|00002530| 2e 0a 20 20 7d 2c 0a 20 | 20 0a 20 20 69 73 43 61 |.. },. | . isCa|
|00002540| 6c 65 6e 64 61 72 49 6e | 46 6f 72 65 67 72 6f 75 |lendarIn|Foregrou|
|00002550| 6e 64 3a 20 66 75 6e 63 | 74 69 6f 6e 20 63 63 49 |nd: func|tion ccI|
|00002560| 43 28 29 20 7b 0a 20 20 | 20 20 72 65 74 75 72 6e |C() {. | return|
|00002570| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00002580| 6d 65 6e 74 42 79 49 64 | 28 22 64 69 73 70 6c 61 |mentById|("displa|
|00002590| 79 44 65 63 6b 22 29 2e | 73 65 6c 65 63 74 65 64 |yDeck").|selected|
|000025a0| 50 61 6e 65 6c 2e 69 64 | 20 3d 3d 20 22 63 61 6c |Panel.id| == "cal|
|000025b0| 65 6e 64 61 72 2d 76 69 | 65 77 2d 62 6f 78 22 3b |endar-vi|ew-box";|
|000025c0| 0a 20 20 7d 0a 7d 3b 0a | 0a 66 75 6e 63 74 69 6f |. }.};.|.functio|
|000025d0| 6e 20 74 6f 64 61 79 28 | 29 0a 7b 0a 20 20 20 20 |n today(|).{. |
|000025e0| 76 61 72 20 64 20 3d 20 | 43 6f 6d 70 6f 6e 65 6e |var d = |Componen|
|000025f0| 74 73 2e 63 6c 61 73 73 | 65 73 5b 27 40 6d 6f 7a |ts.class|es['@moz|
|00002600| 69 6c 6c 61 2e 6f 72 67 | 2f 63 61 6c 65 6e 64 61 |illa.org|/calenda|
|00002610| 72 2f 64 61 74 65 74 69 | 6d 65 3b 31 27 5d 2e 63 |r/dateti|me;1'].c|
|00002620| 72 65 61 74 65 49 6e 73 | 74 61 6e 63 65 28 43 6f |reateIns|tance(Co|
|00002630| 6d 70 6f 6e 65 6e 74 73 | 2e 69 6e 74 65 72 66 61 |mponents|.interfa|
|00002640| 63 65 73 2e 63 61 6c 49 | 44 61 74 65 54 69 6d 65 |ces.calI|DateTime|
|00002650| 29 3b 0a 20 20 20 20 64 | 2e 6a 73 44 61 74 65 20 |);. d|.jsDate |
|00002660| 3d 20 6e 65 77 20 44 61 | 74 65 28 29 3b 0a 20 20 |= new Da|te();. |
|00002670| 20 20 72 65 74 75 72 6e | 20 64 2e 67 65 74 49 6e | return| d.getIn|
|00002680| 54 69 6d 65 7a 6f 6e 65 | 28 63 61 6c 65 6e 64 61 |Timezone|(calenda|
|00002690| 72 44 65 66 61 75 6c 74 | 54 69 6d 65 7a 6f 6e 65 |rDefault|Timezone|
|000026a0| 28 29 29 3b 0a 7d 0a 0a | 66 75 6e 63 74 69 6f 6e |());.}..|function|
|000026b0| 20 79 65 73 74 65 72 64 | 61 79 28 29 0a 7b 0a 20 | yesterd|ay().{. |
|000026c0| 20 20 20 76 61 72 20 64 | 20 3d 20 74 6f 64 61 79 | var d| = today|
|000026d0| 28 29 3b 0a 20 20 20 20 | 64 2e 64 61 79 2d 2d 3b |();. |d.day--;|
|000026e0| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 64 3b 0a 7d |. ret|urn d;.}|
|000026f0| 0a 0a 66 75 6e 63 74 69 | 6f 6e 20 6e 65 78 74 4d |..functi|on nextM|
|00002700| 6f 6e 74 68 28 64 74 29 | 0a 7b 0a 20 20 20 20 76 |onth(dt)|.{. v|
|00002710| 61 72 20 64 20 3d 20 6e | 65 77 20 44 61 74 65 28 |ar d = n|ew Date(|
|00002720| 64 74 29 3b 0a 20 20 20 | 20 64 2e 73 65 74 44 61 |dt);. | d.setDa|
|00002730| 74 65 28 31 29 3b 20 2f | 2f 20 6d 61 6b 65 20 73 |te(1); /|/ make s|
|00002740| 75 72 65 20 77 65 20 61 | 76 6f 69 64 20 22 4a 75 |ure we a|void "Ju|
|00002750| 6e 65 20 33 31 22 20 77 | 68 65 6e 20 77 65 20 62 |ne 31" w|hen we b|
|00002760| 75 6d 70 20 74 68 65 20 | 6d 6f 6e 74 68 0a 0a 20 |ump the |month.. |
|00002770| 20 20 20 76 61 72 20 6d | 6f 20 3d 20 64 2e 67 65 | var m|o = d.ge|
|00002780| 74 4d 6f 6e 74 68 28 29 | 3b 0a 20 20 20 20 69 66 |tMonth()|;. if|
|00002790| 20 28 6d 6f 20 3d 3d 20 | 31 31 29 20 7b 0a 20 20 | (mo == |11) {. |
|000027a0| 20 20 20 20 20 20 64 2e | 73 65 74 4d 6f 6e 74 68 | d.|setMonth|
|000027b0| 28 30 29 3b 0a 20 20 20 | 20 20 20 20 20 64 2e 73 |(0);. | d.s|
|000027c0| 65 74 59 65 61 72 28 64 | 2e 67 65 74 59 65 61 72 |etYear(d|.getYear|
|000027d0| 28 29 20 2b 20 31 29 3b | 0a 20 20 20 20 7d 20 65 |() + 1);|. } e|
|000027e0| 6c 73 65 20 7b 0a 20 20 | 20 20 20 20 20 20 64 2e |lse {. | d.|
|000027f0| 73 65 74 4d 6f 6e 74 68 | 28 6d 6f 20 2b 20 31 29 |setMonth|(mo + 1)|
|00002800| 3b 0a 20 20 20 20 7d 0a | 0a 20 20 20 20 72 65 74 |;. }.|. ret|
|00002810| 75 72 6e 20 64 3b 0a 7d | 0a 0a 76 61 72 20 67 4d |urn d;.}|..var gM|
|00002820| 69 6e 69 4d 6f 6e 74 68 | 4c 6f 61 64 69 6e 67 20 |iniMonth|Loading |
|00002830| 3d 20 66 61 6c 73 65 3b | 0a 66 75 6e 63 74 69 6f |= false;|.functio|
|00002840| 6e 20 6c 74 6e 4d 69 6e | 69 6d 6f 6e 74 68 50 69 |n ltnMin|imonthPi|
|00002850| 63 6b 28 6d 69 6e 69 6d | 6f 6e 74 68 29 0a 7b 0a |ck(minim|onth).{.|
|00002860| 20 20 20 20 69 66 20 28 | 67 4d 69 6e 69 4d 6f 6e | if (|gMiniMon|
|00002870| 74 68 4c 6f 61 64 69 6e | 67 29 0a 20 20 20 20 20 |thLoadin|g). |
|00002880| 20 20 20 72 65 74 75 72 | 6e 3b 0a 0a 20 20 20 20 | retur|n;.. |
|00002890| 76 61 72 20 6a 73 44 61 | 74 65 20 3d 20 6d 69 6e |var jsDa|te = min|
|000028a0| 69 6d 6f 6e 74 68 2e 76 | 61 6c 75 65 3b 0a 20 20 |imonth.v|alue;. |
|000028b0| 20 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c | docume|nt.getEl|
|000028c0| 65 6d 65 6e 74 42 79 49 | 64 28 22 6c 74 6e 44 61 |ementByI|d("ltnDa|
|000028d0| 74 65 54 65 78 74 50 69 | 63 6b 65 72 22 29 2e 76 |teTextPi|cker").v|
|000028e0| 61 6c 75 65 20 3d 20 6a | 73 44 61 74 65 3b 0a 20 |alue = j|sDate;. |
|000028f0| 20 20 20 76 61 72 20 63 | 64 74 20 3d 20 6a 73 44 | var c|dt = jsD|
|00002900| 61 74 65 54 6f 44 61 74 | 65 54 69 6d 65 28 6a 73 |ateToDat|eTime(js|
|00002910| 44 61 74 65 29 3b 0a 0a | 20 20 20 20 69 66 20 28 |Date);..| if (|
|00002920| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00002930| 65 6e 74 42 79 49 64 28 | 22 64 69 73 70 6c 61 79 |entById(|"display|
|00002940| 44 65 63 6b 22 29 2e 73 | 65 6c 65 63 74 65 64 50 |Deck").s|electedP|
|00002950| 61 6e 65 6c 20 21 3d 20 | 0a 20 20 20 20 20 20 20 |anel != |. |
|00002960| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00002970| 6d 65 6e 74 42 79 49 64 | 28 22 63 61 6c 65 6e 64 |mentById|("calend|
|00002980| 61 72 2d 76 69 65 77 2d | 62 6f 78 22 29 29 20 7b |ar-view-|box")) {|
|00002990| 0a 20 20 20 20 20 20 20 | 20 73 68 6f 77 43 61 6c |. | showCal|
|000029a0| 65 6e 64 61 72 56 69 65 | 77 28 67 4c 61 73 74 53 |endarVie|w(gLastS|
|000029b0| 68 6f 77 6e 43 61 6c 65 | 6e 64 61 72 56 69 65 77 |hownCale|ndarView|
|000029c0| 29 3b 0a 20 20 20 20 7d | 0a 0a 20 20 20 20 63 64 |);. }|.. cd|
|000029d0| 74 20 3d 20 63 64 74 2e | 67 65 74 49 6e 54 69 6d |t = cdt.|getInTim|
|000029e0| 65 7a 6f 6e 65 28 63 75 | 72 72 65 6e 74 56 69 65 |ezone(cu|rrentVie|
|000029f0| 77 28 29 2e 74 69 6d 65 | 7a 6f 6e 65 29 3b 0a 20 |w().time|zone);. |
|00002a00| 20 20 20 63 64 74 2e 69 | 73 44 61 74 65 20 3d 20 | cdt.i|sDate = |
|00002a10| 74 72 75 65 3b 0a 20 20 | 20 20 63 75 72 72 65 6e |true;. | curren|
|00002a20| 74 56 69 65 77 28 29 2e | 67 6f 54 6f 44 61 79 28 |tView().|goToDay(|
|00002a30| 63 64 74 29 3b 0a 7d 0a | 0a 66 75 6e 63 74 69 6f |cdt);.}.|.functio|
|00002a40| 6e 20 6c 74 6e 47 6f 54 | 6f 44 61 74 65 28 29 0a |n ltnGoT|oDate().|
|00002a50| 7b 0a 20 20 20 20 76 61 | 72 20 67 6f 54 6f 44 61 |{. va|r goToDa|
|00002a60| 74 65 20 3d 20 64 6f 63 | 75 6d 65 6e 74 2e 67 65 |te = doc|ument.ge|
|00002a70| 74 45 6c 65 6d 65 6e 74 | 42 79 49 64 28 22 6c 74 |tElement|ById("lt|
|00002a80| 6e 44 61 74 65 54 65 78 | 74 50 69 63 6b 65 72 22 |nDateTex|tPicker"|
|00002a90| 29 3b 0a 20 20 20 20 69 | 66 20 28 67 6f 54 6f 44 |);. i|f (goToD|
|00002aa0| 61 74 65 2e 76 61 6c 75 | 65 29 20 7b 0a 20 20 20 |ate.valu|e) {. |
|00002ab0| 20 20 20 20 20 6c 74 6e | 4d 69 6e 69 6d 6f 6e 74 | ltn|Minimont|
|00002ac0| 68 50 69 63 6b 28 67 6f | 54 6f 44 61 74 65 29 3b |hPick(go|ToDate);|
|00002ad0| 0a 20 20 20 20 7d 0a 7d | 0a 0a 66 75 6e 63 74 69 |. }.}|..functi|
|00002ae0| 6f 6e 20 6c 74 6e 4f 6e | 4c 6f 61 64 28 65 76 65 |on ltnOn|Load(eve|
|00002af0| 6e 74 29 0a 7b 0a 20 20 | 20 20 2f 2f 20 4c 6f 61 |nt).{. | // Loa|
|00002b00| 64 20 74 68 65 20 43 61 | 6c 65 6e 64 61 72 20 4d |d the Ca|lendar M|
|00002b10| 61 6e 61 67 65 72 0a 20 | 20 20 20 6c 6f 61 64 43 |anager. | loadC|
|00002b20| 61 6c 65 6e 64 61 72 4d | 61 6e 61 67 65 72 28 29 |alendarM|anager()|
|00002b30| 3b 0a 0a 20 20 20 20 2f | 2f 20 74 61 6b 65 20 74 |;.. /|/ take t|
|00002b40| 68 65 20 65 78 69 73 74 | 69 6e 67 20 66 6f 6c 64 |he exist|ing fold|
|00002b50| 65 72 50 61 6e 65 42 6f | 78 20 28 74 68 61 74 27 |erPaneBo|x (that'|
|00002b60| 73 20 77 68 61 74 20 74 | 68 75 6e 64 65 72 62 69 |s what t|hunderbi|
|00002b70| 72 64 20 64 69 73 70 6c | 61 79 73 0a 20 20 20 20 |rd displ|ays. |
|00002b80| 2f 2f 20 61 74 20 74 68 | 65 20 6c 65 66 74 20 73 |// at th|e left s|
|00002b90| 69 64 65 20 6f 66 20 74 | 68 65 20 61 70 70 6c 69 |ide of t|he appli|
|00002ba0| 63 61 74 69 6f 6e 20 77 | 69 6e 64 6f 77 29 20 61 |cation w|indow) a|
|00002bb0| 6e 64 20 73 74 75 66 66 | 20 74 68 61 74 20 69 6e |nd stuff| that in|
|00002bc0| 73 69 64 65 0a 20 20 20 | 20 2f 2f 20 6f 66 20 74 |side. | // of t|
|00002bd0| 68 65 20 64 65 63 6b 20 | 77 65 27 72 65 20 69 6e |he deck |we're in|
|00002be0| 74 72 6f 64 75 63 69 6e | 67 20 77 69 74 68 20 74 |troducin|g with t|
|00002bf0| 68 65 20 63 6f 6e 74 65 | 6e 74 50 61 6e 65 6c 2e |he conte|ntPanel.|
|00002c00| 20 74 68 69 73 20 65 73 | 73 65 6e 74 69 61 6c 6c | this es|sentiall|
|00002c10| 79 0a 20 20 20 20 2f 2f | 20 72 65 61 72 72 61 6e |y. //| rearran|
|00002c20| 67 65 73 20 74 68 65 20 | 44 4f 4d 20 74 72 65 65 |ges the |DOM tree|
|00002c30| 20 61 6e 64 20 61 6c 6c | 6f 77 73 20 75 73 20 74 | and all|ows us t|
|00002c40| 6f 20 73 77 69 74 63 68 | 20 62 65 74 77 65 65 6e |o switch| between|
|00002c50| 20 63 6f 6e 74 65 6e 74 | 20 74 68 61 74 0a 20 20 | content| that. |
|00002c60| 20 20 2f 2f 20 6c 69 76 | 65 73 20 69 6e 73 69 64 | // liv|es insid|
|00002c70| 65 20 6f 66 20 74 68 65 | 20 6c 65 66 74 20 70 61 |e of the| left pa|
|00002c80| 6e 65 2e 0a 20 20 20 20 | 76 61 72 20 66 6f 6c 64 |ne.. |var fold|
|00002c90| 65 72 50 61 6e 65 42 6f | 78 20 3d 20 64 6f 63 75 |erPaneBo|x = docu|
|00002ca0| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00002cb0| 79 49 64 28 22 66 6f 6c | 64 65 72 50 61 6e 65 42 |yId("fol|derPaneB|
|00002cc0| 6f 78 22 29 3b 0a 20 20 | 20 20 76 61 72 20 63 6f |ox");. | var co|
|00002cd0| 6e 74 65 6e 74 50 61 6e | 65 6c 20 3d 20 64 6f 63 |ntentPan|el = doc|
|00002ce0| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|00002cf0| 42 79 49 64 28 22 63 6f | 6e 74 65 6e 74 50 61 6e |ById("co|ntentPan|
|00002d00| 65 6c 22 29 3b 0a 20 20 | 20 20 63 6f 6e 74 65 6e |el");. | conten|
|00002d10| 74 50 61 6e 65 6c 2e 69 | 6e 73 65 72 74 42 65 66 |tPanel.i|nsertBef|
|00002d20| 6f 72 65 28 66 6f 6c 64 | 65 72 50 61 6e 65 42 6f |ore(fold|erPaneBo|
|00002d30| 78 2c 20 63 6f 6e 74 65 | 6e 74 50 61 6e 65 6c 2e |x, conte|ntPanel.|
|00002d40| 66 69 72 73 74 43 68 69 | 6c 64 29 3b 0a 0a 20 20 |firstChi|ld);.. |
|00002d50| 20 20 2f 2f 20 77 65 27 | 72 65 20 74 61 6b 69 6e | // we'|re takin|
|00002d60| 67 20 63 61 72 65 20 6f | 66 20 74 68 65 20 6d 6f |g care o|f the mo|
|00002d70| 64 65 20 74 6f 6f 6c 62 | 61 72 20 28 74 68 61 74 |de toolb|ar (that|
|00002d80| 27 73 20 74 68 65 20 73 | 6d 61 6c 6c 20 74 6f 6f |'s the s|mall too|
|00002d90| 6c 62 61 72 20 6f 6e 0a | 20 20 20 20 2f 2f 20 74 |lbar on.| // t|
|00002da0| 68 65 20 6c 6f 77 65 72 | 20 6c 65 66 74 20 77 69 |he lower| left wi|
|00002db0| 74 68 20 74 68 65 20 27 | 6d 61 69 6c 27 2c 20 27 |th the '|mail', '|
|00002dc0| 63 61 6c 65 6e 64 61 72 | 27 2c 20 27 74 61 73 6b |calendar|', 'task|
|00002dd0| 27 20 62 75 74 74 6f 6e | 73 20 6f 6e 20 69 74 29 |' button|s on it)|
|00002de0| 2e 0a 20 20 20 20 2f 2f | 20 73 69 6e 63 65 20 77 |.. //| since w|
|00002df0| 65 20 77 61 6e 74 20 74 | 6f 20 68 61 76 65 20 74 |e want t|o have t|
|00002e00| 68 69 73 20 70 61 72 74 | 69 63 75 6c 61 72 20 74 |his part|icular t|
|00002e10| 6f 6f 6c 62 61 72 20 64 | 69 73 70 6c 61 79 65 64 |oolbar d|isplayed|
|00002e20| 20 61 74 20 74 68 65 0a | 20 20 20 20 2f 2f 20 74 | at the.| // t|
|00002e30| 6f 70 20 6f 72 20 62 6f | 74 74 6f 6d 20 69 6e 73 |op or bo|ttom ins|
|00002e40| 69 64 65 20 74 68 65 20 | 66 6f 6c 64 65 72 50 61 |ide the |folderPa|
|00002e50| 6e 65 42 6f 78 20 28 62 | 61 73 69 63 61 6c 6c 79 |neBox (b|asically|
|00002e60| 20 6f 6e 20 74 6f 70 20 | 6f 72 20 62 6f 74 74 6f | on top |or botto|
|00002e70| 6d 0a 20 20 20 20 2f 2f | 20 6f 66 20 74 68 65 20 |m. //| of the |
|00002e80| 77 69 6e 64 6f 77 29 20 | 77 65 20 6e 65 65 64 20 |window) |we need |
|00002e90| 74 6f 20 67 6f 20 74 6f | 20 67 72 65 61 74 20 6c |to go to| great l|
|00002ea0| 65 6e 67 74 68 20 69 6e | 20 6f 72 64 65 72 20 74 |ength in| order t|
|00002eb0| 6f 20 67 65 74 20 74 68 | 69 73 0a 20 20 20 20 2f |o get th|is. /|
|00002ec0| 2f 20 64 61 6d 6e 65 64 | 20 74 68 69 6e 67 20 77 |/ damned| thing w|
|00002ed0| 6f 72 6b 69 6e 67 2e 20 | 69 20 64 65 63 69 64 65 |orking. |i decide|
|00002ee0| 64 20 74 6f 20 64 79 6e | 61 6d 69 63 61 6c 6c 79 |d to dyn|amically|
|00002ef0| 20 70 6c 61 63 65 20 74 | 68 65 20 74 6f 6f 6c 62 | place t|he toolb|
|00002f00| 6f 78 0a 20 20 20 20 2f | 2f 20 69 6e 73 69 64 65 |ox. /|/ inside|
|00002f10| 20 74 68 65 20 44 4f 4d | 20 74 72 65 65 2c 20 74 | the DOM| tree, t|
|00002f20| 68 61 74 20 61 70 70 65 | 61 72 73 20 74 6f 20 62 |hat appe|ars to b|
|00002f30| 65 20 74 68 65 20 6d 6f | 73 74 20 63 6c 65 61 6e |e the mo|st clean|
|00002f40| 20 73 6f 6c 75 74 69 6f | 6e 20 74 6f 0a 20 20 20 | solutio|n to. |
|00002f50| 20 2f 2f 20 74 68 65 20 | 70 72 6f 62 6c 65 6d 2e | // the |problem.|
|00002f60| 20 75 6e 66 6f 72 74 75 | 6e 61 74 65 6c 79 2c 20 | unfortu|nately, |
|00002f70| 69 74 20 64 69 64 6e 27 | 74 20 77 6f 72 6b 20 6f |it didn'|t work o|
|00002f80| 75 74 20 74 68 61 74 20 | 65 61 73 79 2e 20 61 73 |ut that |easy. as|
|00002f90| 20 73 6f 6f 6e 0a 20 20 | 20 20 2f 2f 20 61 73 20 | soon. | // as |
|00002fa0| 77 65 20 63 61 6c 6c 20 | 69 6e 73 65 72 74 42 65 |we call |insertBe|
|00002fb0| 66 6f 72 65 28 29 20 74 | 6f 20 70 6c 61 63 65 20 |fore() t|o place |
|00002fc0| 74 68 65 20 6e 6f 64 65 | 20 73 6f 6d 65 77 68 65 |the node| somewhe|
|00002fd0| 72 65 20 64 69 66 66 65 | 72 65 6e 74 2c 20 74 68 |re diffe|rent, th|
|00002fe0| 65 0a 20 20 20 20 2f 2f | 20 63 6f 6e 73 74 72 75 |e. //| constru|
|00002ff0| 63 74 6f 72 20 6f 66 20 | 74 68 65 20 61 70 70 72 |ctor of |the appr|
|00003000| 6f 70 72 69 61 74 65 20 | 62 69 6e 64 69 6e 67 20 |opriate |binding |
|00003010| 67 65 74 73 20 63 61 6c | 6c 65 64 20 61 67 61 69 |gets cal|led agai|
|00003020| 6e 2e 20 74 68 69 73 20 | 68 61 73 0a 20 20 20 20 |n. this |has. |
|00003030| 2f 2f 20 74 68 65 20 6e | 61 73 74 79 20 73 69 64 |// the n|asty sid|
|00003040| 65 2d 65 66 66 65 63 74 | 20 74 68 61 74 20 74 68 |e-effect| that th|
|00003050| 65 20 74 6f 6f 6c 62 61 | 72 20 67 65 74 20 61 20 |e toolba|r get a |
|00003060| 62 69 74 20 63 6f 6e 66 | 75 73 65 64 2c 20 73 69 |bit conf|used, si|
|00003070| 6e 63 65 20 69 74 0a 20 | 20 20 20 2f 2f 20 74 68 |nce it. | // th|
|00003080| 69 6e 6b 73 20 69 74 20 | 69 73 20 63 75 73 74 6f |inks it |is custo|
|00003090| 6d 69 7a 65 64 2c 20 77 | 68 69 63 68 20 6a 75 73 |mized, w|hich jus|
|000030a0| 74 20 69 73 6e 27 74 20 | 74 68 65 20 63 61 73 65 |t isn't |the case|
|000030b0| 2e 20 74 68 61 74 27 73 | 20 77 68 79 20 77 65 20 |. that's| why we |
|000030c0| 6e 65 65 64 0a 20 20 20 | 20 2f 2f 20 74 6f 20 63 |need. | // to c|
|000030d0| 61 72 72 79 20 73 6f 6d | 65 20 69 6e 74 65 72 6e |arry som|e intern|
|000030e0| 61 6c 20 74 6f 6f 6c 62 | 61 72 20 70 72 6f 70 65 |al toolb|ar prope|
|000030f0| 72 74 69 65 73 20 6f 76 | 65 72 2e 20 61 6e 64 20 |rties ov|er. and |
|00003100| 74 68 61 74 27 73 20 77 | 68 61 74 20 74 68 6f 73 |that's w|hat thos|
|00003110| 65 0a 20 20 20 20 2f 2f | 20 66 75 6e 63 74 69 6f |e. //| functio|
|00003120| 6e 73 20 72 65 74 72 69 | 65 76 65 54 6f 6f 6c 62 |ns retri|eveToolb|
|00003130| 61 72 50 72 6f 70 65 72 | 74 69 65 73 28 29 20 61 |arProper|ties() a|
|00003140| 6e 64 20 72 65 73 74 6f | 72 65 54 6f 6f 6c 62 61 |nd resto|reToolba|
|00003150| 72 50 72 6f 70 65 72 74 | 69 65 73 28 29 0a 20 20 |rPropert|ies(). |
|00003160| 20 20 2f 2f 20 61 72 65 | 20 61 6c 6c 20 61 62 6f | // are| all abo|
|00003170| 75 74 2e 0a 20 20 20 20 | 76 61 72 20 72 65 74 72 |ut.. |var retr|
|00003180| 69 65 76 65 54 6f 6f 6c | 62 61 72 50 72 6f 70 65 |ieveTool|barPrope|
|00003190| 72 74 69 65 73 20 3d 20 | 66 75 6e 63 74 69 6f 6e |rties = |function|
|000031a0| 28 74 6f 6f 6c 62 6f 78 | 29 0a 20 20 20 20 7b 0a |(toolbox|). {.|
|000031b0| 20 20 20 20 20 20 76 61 | 72 20 74 6f 6f 6c 62 61 | va|r toolba|
|000031c0| 72 73 20 3d 20 7b 7d 3b | 0a 20 20 20 20 20 20 76 |rs = {};|. v|
|000031d0| 61 72 20 74 6f 6f 6c 62 | 61 72 20 3d 20 74 6f 6f |ar toolb|ar = too|
|000031e0| 6c 62 6f 78 2e 66 69 72 | 73 74 43 68 69 6c 64 3b |lbox.fir|stChild;|
|000031f0| 0a 20 20 20 20 20 20 77 | 68 69 6c 65 20 28 74 6f |. w|hile (to|
|00003200| 6f 6c 62 61 72 29 20 7b | 0a 20 20 20 20 20 20 20 |olbar) {|. |
|00003210| 20 69 66 20 28 74 6f 6f | 6c 62 61 72 2e 6c 6f 63 | if (too|lbar.loc|
|00003220| 61 6c 4e 61 6d 65 20 3d | 3d 20 22 74 6f 6f 6c 62 |alName =|= "toolb|
|00003230| 61 72 22 29 20 7b 0a 20 | 20 20 20 20 20 20 20 20 |ar") {. | |
|00003240| 20 69 66 20 28 74 6f 6f | 6c 62 61 72 2e 67 65 74 | if (too|lbar.get|
|00003250| 41 74 74 72 69 62 75 74 | 65 28 22 63 75 73 74 6f |Attribut|e("custo|
|00003260| 6d 69 7a 61 62 6c 65 22 | 29 20 3d 3d 20 22 74 72 |mizable"|) == "tr|
|00003270| 75 65 22 29 20 7b 0a 20 | 20 20 20 20 20 20 20 20 |ue") {. | |
|00003280| 20 20 20 69 66 20 28 21 | 74 6f 6f 6c 62 61 72 2e | if (!|toolbar.|
|00003290| 68 61 73 41 74 74 72 69 | 62 75 74 65 28 22 63 75 |hasAttri|bute("cu|
|000032a0| 73 74 6f 6d 69 6e 64 65 | 78 22 29 29 20 7b 0a 20 |stominde|x")) {. |
|000032b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 76 61 72 | | var|
|000032c0| 20 70 72 6f 70 65 72 74 | 79 62 61 67 20 3d 20 7b | propert|ybag = {|
|000032d0| 7d 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |};. | |
|000032e0| 20 70 72 6f 70 65 72 74 | 79 62 61 67 2e 66 69 72 | propert|ybag.fir|
|000032f0| 73 74 50 65 72 6d 61 6e | 65 6e 74 43 68 69 6c 64 |stPerman|entChild|
|00003300| 20 3d 20 74 6f 6f 6c 62 | 61 72 2e 66 69 72 73 74 | = toolb|ar.first|
|00003310| 50 65 72 6d 61 6e 65 6e | 74 43 68 69 6c 64 3b 0a |Permanen|tChild;.|
|00003320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 72 | | pr|
|00003330| 6f 70 65 72 74 79 62 61 | 67 2e 6c 61 73 74 50 65 |opertyba|g.lastPe|
|00003340| 72 6d 61 6e 65 6e 74 43 | 68 69 6c 64 20 3d 20 74 |rmanentC|hild = t|
|00003350| 6f 6f 6c 62 61 72 2e 6c | 61 73 74 50 65 72 6d 61 |oolbar.l|astPerma|
|00003360| 6e 65 6e 74 43 68 69 6c | 64 3b 0a 20 20 20 20 20 |nentChil|d;. |
|00003370| 20 20 20 20 20 20 20 20 | 20 74 6f 6f 6c 62 61 72 | | toolbar|
|00003380| 73 5b 74 6f 6f 6c 62 61 | 72 2e 69 64 5d 20 3d 20 |s[toolba|r.id] = |
|00003390| 70 72 6f 70 65 72 74 79 | 62 61 67 3b 0a 20 20 20 |property|bag;. |
|000033a0| 20 20 20 20 20 20 20 20 | 20 7d 0a 20 20 20 20 20 | | }. |
|000033b0| 20 20 20 20 20 7d 0a 20 | 20 20 20 20 20 20 20 7d | }. | }|
|000033c0| 0a 20 20 20 20 20 20 20 | 20 74 6f 6f 6c 62 61 72 |. | toolbar|
|000033d0| 20 3d 20 74 6f 6f 6c 62 | 61 72 2e 6e 65 78 74 53 | = toolb|ar.nextS|
|000033e0| 69 62 6c 69 6e 67 3b 0a | 20 20 20 20 20 20 7d 0a |ibling;.| }.|
|000033f0| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 74 6f 6f | re|turn too|
|00003400| 6c 62 61 72 73 3b 0a 20 | 20 20 20 7d 0a 20 20 20 |lbars;. | }. |
|00003410| 20 0a 20 20 20 20 76 61 | 72 20 72 65 73 74 6f 72 | . va|r restor|
|00003420| 65 54 6f 6f 6c 62 61 72 | 50 72 6f 70 65 72 74 69 |eToolbar|Properti|
|00003430| 65 73 20 3d 20 66 75 6e | 63 74 69 6f 6e 28 74 6f |es = fun|ction(to|
|00003440| 6f 6c 62 6f 78 2c 74 6f | 6f 6c 62 61 72 73 29 0a |olbox,to|olbars).|
|00003450| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 76 61 72 20 | {. | var |
|00003460| 74 6f 6f 6c 62 61 72 20 | 3d 20 74 6f 6f 6c 62 6f |toolbar |= toolbo|
|00003470| 78 2e 66 69 72 73 74 43 | 68 69 6c 64 3b 0a 20 20 |x.firstC|hild;. |
|00003480| 20 20 20 20 77 68 69 6c | 65 20 28 74 6f 6f 6c 62 | whil|e (toolb|
|00003490| 61 72 29 20 7b 0a 20 20 | 20 20 20 20 20 20 69 66 |ar) {. | if|
|000034a0| 20 28 74 6f 6f 6c 62 61 | 72 2e 6c 6f 63 61 6c 4e | (toolba|r.localN|
|000034b0| 61 6d 65 20 3d 3d 20 22 | 74 6f 6f 6c 62 61 72 22 |ame == "|toolbar"|
|000034c0| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 69 66 |) {. | if|
|000034d0| 20 28 74 6f 6f 6c 62 61 | 72 2e 67 65 74 41 74 74 | (toolba|r.getAtt|
|000034e0| 72 69 62 75 74 65 28 22 | 63 75 73 74 6f 6d 69 7a |ribute("|customiz|
|000034f0| 61 62 6c 65 22 29 20 3d | 3d 20 22 74 72 75 65 22 |able") =|= "true"|
|00003500| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|00003510| 69 66 20 28 21 74 6f 6f | 6c 62 61 72 2e 68 61 73 |if (!too|lbar.has|
|00003520| 41 74 74 72 69 62 75 74 | 65 28 22 63 75 73 74 6f |Attribut|e("custo|
|00003530| 6d 69 6e 64 65 78 22 29 | 29 20 7b 0a 20 20 20 20 |mindex")|) {. |
|00003540| 20 20 20 20 20 20 20 20 | 20 20 76 61 72 20 70 72 | | var pr|
|00003550| 6f 70 65 72 74 79 62 61 | 67 20 3d 20 74 6f 6f 6c |opertyba|g = tool|
|00003560| 62 61 72 73 5b 74 6f 6f | 6c 62 61 72 2e 69 64 5d |bars[too|lbar.id]|
|00003570| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00003580| 74 6f 6f 6c 62 61 72 2e | 66 69 72 73 74 50 65 72 |toolbar.|firstPer|
|00003590| 6d 61 6e 65 6e 74 43 68 | 69 6c 64 20 3d 20 70 72 |manentCh|ild = pr|
|000035a0| 6f 70 65 72 74 79 62 61 | 67 2e 66 69 72 73 74 50 |opertyba|g.firstP|
|000035b0| 65 72 6d 61 6e 65 6e 74 | 43 68 69 6c 64 3b 0a 20 |ermanent|Child;. |
|000035c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 74 6f 6f | | too|
|000035d0| 6c 62 61 72 2e 6c 61 73 | 74 50 65 72 6d 61 6e 65 |lbar.las|tPermane|
|000035e0| 6e 74 43 68 69 6c 64 20 | 3d 20 70 72 6f 70 65 72 |ntChild |= proper|
|000035f0| 74 79 62 61 67 2e 6c 61 | 73 74 50 65 72 6d 61 6e |tybag.la|stPerman|
|00003600| 65 6e 74 43 68 69 6c 64 | 3b 0a 20 20 20 20 20 20 |entChild|;. |
|00003610| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 20 20 | }.| |
|00003620| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 | }. | }. |
|00003630| 20 20 20 20 20 20 74 6f | 6f 6c 62 61 72 20 3d 20 | to|olbar = |
|00003640| 74 6f 6f 6c 62 61 72 2e | 6e 65 78 74 53 69 62 6c |toolbar.|nextSibl|
|00003650| 69 6e 67 3b 0a 20 20 20 | 20 20 20 7d 0a 20 20 20 |ing;. | }. |
|00003660| 20 7d 0a 20 20 20 20 0a | 20 20 20 20 2f 2f 20 44 | }. .| // D|
|00003670| 4f 4d 41 74 74 72 4d 6f | 64 69 66 69 65 64 20 68 |OMAttrMo|dified h|
|00003680| 61 6e 64 6c 65 72 20 74 | 68 61 74 20 6c 69 73 74 |andler t|hat list|
|00003690| 65 6e 73 20 6f 6e 20 74 | 68 65 20 74 6f 6f 6c 62 |ens on t|he toolb|
|000036a0| 6f 78 20 65 6c 65 6d 65 | 6e 74 0a 20 20 20 20 76 |ox eleme|nt. v|
|000036b0| 61 72 20 6f 6e 4d 6f 64 | 69 66 69 65 64 20 3d 20 |ar onMod|ified = |
|000036c0| 66 75 6e 63 74 69 6f 6e | 28 61 45 76 65 6e 74 29 |function|(aEvent)|
|000036d0| 0a 20 20 20 20 7b 0a 20 | 20 20 20 20 20 69 66 28 |. {. | if(|
|000036e0| 61 45 76 65 6e 74 2e 61 | 74 74 72 4e 61 6d 65 20 |aEvent.a|ttrName |
|000036f0| 3d 3d 20 22 6c 6f 63 61 | 74 69 6f 6e 22 29 20 7b |== "loca|tion") {|
|00003700| 0a 20 20 20 20 20 20 20 | 20 76 61 72 20 63 6f 6e |. | var con|
|00003710| 74 65 6e 74 50 61 6e 65 | 6c 20 3d 20 64 6f 63 75 |tentPane|l = docu|
|00003720| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00003730| 79 49 64 28 22 63 6f 6e | 74 65 6e 74 50 61 6e 65 |yId("con|tentPane|
|00003740| 6c 22 29 3b 0a 20 20 20 | 20 20 20 20 20 76 61 72 |l");. | var|
|00003750| 20 6d 6f 64 65 54 6f 6f | 6c 62 6f 78 20 3d 20 64 | modeToo|lbox = d|
|00003760| 6f 63 75 6d 65 6e 74 2e | 67 65 74 45 6c 65 6d 65 |ocument.|getEleme|
|00003770| 6e 74 42 79 49 64 28 22 | 6d 6f 64 65 2d 74 6f 6f |ntById("|mode-too|
|00003780| 6c 62 6f 78 22 29 3b 0a | 20 20 20 20 20 20 20 20 |lbox");.| |
|00003790| 76 61 72 20 70 61 6c 65 | 74 74 65 20 3d 20 6d 6f |var pale|tte = mo|
|000037a0| 64 65 54 6f 6f 6c 62 6f | 78 2e 70 61 6c 65 74 74 |deToolbo|x.palett|
|000037b0| 65 3b 0a 20 20 20 20 20 | 20 20 20 6d 6f 64 65 54 |e;. | modeT|
|000037c0| 6f 6f 6c 62 6f 78 2e 72 | 65 6d 6f 76 65 45 76 65 |oolbox.r|emoveEve|
|000037d0| 6e 74 4c 69 73 74 65 6e | 65 72 28 22 44 4f 4d 41 |ntListen|er("DOMA|
|000037e0| 74 74 72 4d 6f 64 69 66 | 69 65 64 22 2c 20 6f 6e |ttrModif|ied", on|
|000037f0| 4d 6f 64 69 66 69 65 64 | 2c 20 66 61 6c 73 65 29 |Modified|, false)|
|00003800| 3b 0a 20 20 20 20 20 20 | 20 20 76 61 72 20 62 61 |;. | var ba|
|00003810| 67 20 3d 20 72 65 74 72 | 69 65 76 65 54 6f 6f 6c |g = retr|ieveTool|
|00003820| 62 61 72 50 72 6f 70 65 | 72 74 69 65 73 28 6d 6f |barPrope|rties(mo|
|00003830| 64 65 54 6f 6f 6c 62 6f | 78 29 3b 0a 20 20 20 20 |deToolbo|x);. |
|00003840| 20 20 20 20 69 66 28 61 | 45 76 65 6e 74 2e 6e 65 | if(a|Event.ne|
|00003850| 77 56 61 6c 75 65 20 3d | 3d 20 22 74 6f 70 22 20 |wValue =|= "top" |
|00003860| 26 26 20 21 61 45 76 65 | 6e 74 2e 70 72 65 76 56 |&& !aEve|nt.prevV|
|00003870| 61 6c 75 65 20 7c 7c 20 | 61 45 76 65 6e 74 2e 70 |alue || |aEvent.p|
|00003880| 72 65 76 56 61 6c 75 65 | 20 3d 3d 20 22 62 6f 74 |revValue| == "bot|
|00003890| 74 6f 6d 22 29 20 7b 0a | 20 20 20 20 20 20 20 20 |tom") {.| |
|000038a0| 20 20 2f 2f 20 70 6c 61 | 63 65 20 74 68 65 20 6d | // pla|ce the m|
|000038b0| 6f 64 65 20 74 6f 6f 6c | 62 6f 78 20 61 74 20 74 |ode tool|box at t|
|000038c0| 68 65 20 74 6f 70 20 6f | 66 20 74 68 65 20 6c 65 |he top o|f the le|
|000038d0| 66 74 20 70 61 6e 65 0a | 20 20 20 20 20 20 20 20 |ft pane.| |
|000038e0| 20 20 6d 6f 64 65 54 6f | 6f 6c 62 6f 78 20 3d 20 | modeTo|olbox = |
|000038f0| 63 6f 6e 74 65 6e 74 50 | 61 6e 65 6c 2e 70 61 72 |contentP|anel.par|
|00003900| 65 6e 74 4e 6f 64 65 2e | 69 6e 73 65 72 74 42 65 |entNode.|insertBe|
|00003910| 66 6f 72 65 28 6d 6f 64 | 65 54 6f 6f 6c 62 6f 78 |fore(mod|eToolbox|
|00003920| 2c 20 63 6f 6e 74 65 6e | 74 50 61 6e 65 6c 29 3b |, conten|tPanel);|
|00003930| 0a 20 20 20 20 20 20 20 | 20 20 20 6d 6f 64 65 54 |. | modeT|
|00003940| 6f 6f 6c 62 6f 78 2e 70 | 61 6c 65 74 74 65 20 3d |oolbox.p|alette =|
|00003950| 20 70 61 6c 65 74 74 65 | 3b 0a 20 20 20 20 20 20 | palette|;. |
|00003960| 20 20 20 20 76 61 72 20 | 74 6f 6f 6c 62 61 72 20 | var |toolbar |
|00003970| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |= docume|nt.getEl|
|00003980| 65 6d 65 6e 74 42 79 49 | 64 28 22 6d 6f 64 65 2d |ementByI|d("mode-|
|00003990| 74 6f 6f 6c 62 61 72 22 | 29 3b 0a 20 20 20 20 20 |toolbar"|);. |
|000039a0| 20 20 20 7d 20 65 6c 73 | 65 20 69 66 28 61 45 76 | } els|e if(aEv|
|000039b0| 65 6e 74 2e 6e 65 77 56 | 61 6c 75 65 20 3d 3d 20 |ent.newV|alue == |
|000039c0| 22 62 6f 74 74 6f 6d 22 | 20 26 26 20 61 45 76 65 |"bottom"| && aEve|
|000039d0| 6e 74 2e 70 72 65 76 56 | 61 6c 75 65 20 3d 3d 20 |nt.prevV|alue == |
|000039e0| 22 74 6f 70 22 29 20 7b | 0a 20 20 20 20 20 20 20 |"top") {|. |
|000039f0| 20 20 20 2f 2f 20 70 6c | 61 63 65 20 74 68 65 20 | // pl|ace the |
|00003a00| 6d 6f 64 65 20 74 6f 6f | 6c 62 6f 78 20 61 74 20 |mode too|lbox at |
|00003a10| 74 68 65 20 62 6f 74 74 | 6f 6d 20 6f 66 20 74 68 |the bott|om of th|
|00003a20| 65 20 6c 65 66 74 20 70 | 61 6e 65 0a 20 20 20 20 |e left p|ane. |
|00003a30| 20 20 20 20 20 20 6d 6f | 64 65 54 6f 6f 6c 62 6f | mo|deToolbo|
|00003a40| 78 20 3d 20 63 6f 6e 74 | 65 6e 74 50 61 6e 65 6c |x = cont|entPanel|
|00003a50| 2e 70 61 72 65 6e 74 4e | 6f 64 65 2e 61 70 70 65 |.parentN|ode.appe|
|00003a60| 6e 64 43 68 69 6c 64 28 | 6d 6f 64 65 54 6f 6f 6c |ndChild(|modeTool|
|00003a70| 62 6f 78 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |box);. | |
|00003a80| 6d 6f 64 65 54 6f 6f 6c | 62 6f 78 2e 70 61 6c 65 |modeTool|box.pale|
|00003a90| 74 74 65 20 3d 20 70 61 | 6c 65 74 74 65 3b 0a 20 |tte = pa|lette;. |
|00003aa0| 20 20 20 20 20 20 20 7d | 0a 20 20 20 20 20 20 20 | }|. |
|00003ab0| 20 72 65 73 74 6f 72 65 | 54 6f 6f 6c 62 61 72 50 | restore|ToolbarP|
|00003ac0| 72 6f 70 65 72 74 69 65 | 73 28 6d 6f 64 65 54 6f |ropertie|s(modeTo|
|00003ad0| 6f 6c 62 6f 78 2c 62 61 | 67 29 3b 0a 20 20 20 20 |olbox,ba|g);. |
|00003ae0| 20 20 20 20 6d 6f 64 65 | 54 6f 6f 6c 62 6f 78 2e | mode|Toolbox.|
|00003af0| 61 64 64 45 76 65 6e 74 | 4c 69 73 74 65 6e 65 72 |addEvent|Listener|
|00003b00| 28 22 44 4f 4d 41 74 74 | 72 4d 6f 64 69 66 69 65 |("DOMAtt|rModifie|
|00003b10| 64 22 2c 20 6f 6e 4d 6f | 64 69 66 69 65 64 2c 20 |d", onMo|dified, |
|00003b20| 66 61 6c 73 65 29 3b 0a | 20 20 20 20 20 20 7d 0a |false);.| }.|
|00003b30| 20 20 20 20 7d 0a 0a 20 | 20 20 20 2f 2f 20 69 6e | }.. | // in|
|00003b40| 73 74 61 6c 6c 20 74 68 | 65 20 68 61 6e 64 6c 65 |stall th|e handle|
|00003b50| 72 20 74 68 61 74 20 6c | 69 73 74 65 6e 73 20 66 |r that l|istens f|
|00003b60| 6f 72 20 6d 6f 64 69 66 | 69 65 64 20 27 6c 6f 63 |or modif|ied 'loc|
|00003b70| 61 74 69 6f 6e 27 20 61 | 74 74 72 69 62 75 74 65 |ation' a|ttribute|
|00003b80| 0a 20 20 20 20 2f 2f 20 | 6f 6e 20 74 68 65 20 74 |. // |on the t|
|00003b90| 6f 6f 6c 62 6f 78 2e 20 | 74 68 65 20 76 61 6c 75 |oolbox. |the valu|
|00003ba0| 65 20 69 73 20 63 68 61 | 6e 67 65 64 20 62 79 20 |e is cha|nged by |
|00003bb0| 74 68 65 20 74 6f 6f 6c | 62 61 72 20 63 75 73 74 |the tool|bar cust|
|00003bc0| 6f 6d 69 7a 65 20 64 69 | 61 6c 6f 67 2e 0a 20 20 |omize di|alog.. |
|00003bd0| 20 20 76 61 72 20 6d 6f | 64 65 54 6f 6f 6c 62 6f | var mo|deToolbo|
|00003be0| 78 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 |x = docu|ment.get|
|00003bf0| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 22 6d 6f 64 |ElementB|yId("mod|
|00003c00| 65 2d 74 6f 6f 6c 62 6f | 78 22 29 3b 0a 20 20 20 |e-toolbo|x");. |
|00003c10| 20 69 66 28 6d 6f 64 65 | 54 6f 6f 6c 62 6f 78 2e | if(mode|Toolbox.|
|00003c20| 67 65 74 41 74 74 72 69 | 62 75 74 65 28 22 6c 6f |getAttri|bute("lo|
|00003c30| 63 61 74 69 6f 6e 22 29 | 20 21 3d 20 22 62 6f 74 |cation")| != "bot|
|00003c40| 74 6f 6d 22 29 20 7b 0a | 20 20 20 20 20 20 76 61 |tom") {.| va|
|00003c50| 72 20 70 61 6c 65 74 74 | 65 20 3d 20 6d 6f 64 65 |r palett|e = mode|
|00003c60| 54 6f 6f 6c 62 6f 78 2e | 70 61 6c 65 74 74 65 3b |Toolbox.|palette;|
|00003c70| 0a 20 20 20 20 20 20 76 | 61 72 20 62 61 67 20 3d |. v|ar bag =|
|00003c80| 20 72 65 74 72 69 65 76 | 65 54 6f 6f 6c 62 61 72 | retriev|eToolbar|
|00003c90| 50 72 6f 70 65 72 74 69 | 65 73 28 6d 6f 64 65 54 |Properti|es(modeT|
|00003ca0| 6f 6f 6c 62 6f 78 29 3b | 0a 20 20 20 20 20 20 6d |oolbox);|. m|
|00003cb0| 6f 64 65 54 6f 6f 6c 62 | 6f 78 20 3d 20 63 6f 6e |odeToolb|ox = con|
|00003cc0| 74 65 6e 74 50 61 6e 65 | 6c 2e 70 61 72 65 6e 74 |tentPane|l.parent|
|00003cd0| 4e 6f 64 65 2e 69 6e 73 | 65 72 74 42 65 66 6f 72 |Node.ins|ertBefor|
|00003ce0| 65 28 6d 6f 64 65 54 6f | 6f 6c 62 6f 78 2c 20 63 |e(modeTo|olbox, c|
|00003cf0| 6f 6e 74 65 6e 74 50 61 | 6e 65 6c 29 3b 0a 20 20 |ontentPa|nel);. |
|00003d00| 20 20 20 20 6d 6f 64 65 | 54 6f 6f 6c 62 6f 78 2e | mode|Toolbox.|
|00003d10| 70 61 6c 65 74 74 65 20 | 3d 20 70 61 6c 65 74 74 |palette |= palett|
|00003d20| 65 3b 0a 20 20 20 20 20 | 20 72 65 73 74 6f 72 65 |e;. | restore|
|00003d30| 54 6f 6f 6c 62 61 72 50 | 72 6f 70 65 72 74 69 65 |ToolbarP|ropertie|
|00003d40| 73 28 6d 6f 64 65 54 6f | 6f 6c 62 6f 78 2c 62 61 |s(modeTo|olbox,ba|
|00003d50| 67 29 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 6d 6f |g);. |}. mo|
|00003d60| 64 65 54 6f 6f 6c 62 6f | 78 2e 61 64 64 45 76 65 |deToolbo|x.addEve|
|00003d70| 6e 74 4c 69 73 74 65 6e | 65 72 28 22 44 4f 4d 41 |ntListen|er("DOMA|
|00003d80| 74 74 72 4d 6f 64 69 66 | 69 65 64 22 2c 20 6f 6e |ttrModif|ied", on|
|00003d90| 4d 6f 64 69 66 69 65 64 | 2c 20 66 61 6c 73 65 29 |Modified|, false)|
|00003da0| 3b 0a 0a 20 20 20 20 2f | 2f 20 54 6f 20 6d 61 6b |;.. /|/ To mak|
|00003db0| 65 20 73 75 72 65 20 74 | 68 65 20 66 6f 6c 64 65 |e sure t|he folde|
|00003dc0| 72 20 70 61 6e 65 20 64 | 6f 65 73 6e 27 74 20 64 |r pane d|oesn't d|
|00003dd0| 69 73 61 70 70 65 61 72 | 20 77 69 74 68 6f 75 74 |isappear| without|
|00003de0| 20 61 6e 79 20 70 6f 73 | 73 69 62 69 6c 69 74 79 | any pos|sibility|
|00003df0| 0a 20 20 20 20 2f 2f 20 | 74 6f 20 67 65 74 20 69 |. // |to get i|
|00003e00| 74 20 62 61 63 6b 2c 20 | 77 65 20 6e 65 65 64 20 |t back, |we need |
|00003e10| 74 6f 20 72 65 76 65 61 | 6c 20 69 74 20 77 68 65 |to revea|l it whe|
|00003e20| 6e 20 74 68 65 20 6d 6f | 64 65 20 62 6f 78 20 69 |n the mo|de box i|
|00003e30| 73 20 63 6f 6c 6c 61 70 | 73 65 64 2e 0a 20 20 20 |s collap|sed.. |
|00003e40| 20 66 75 6e 63 74 69 6f | 6e 20 6d 6f 64 65 42 6f | functio|n modeBo|
|00003e50| 78 41 74 74 72 4d 6f 64 | 69 66 69 65 64 28 65 76 |xAttrMod|ified(ev|
|00003e60| 65 6e 74 29 20 7b 0a 20 | 20 20 20 20 20 20 20 69 |ent) {. | i|
|00003e70| 66 20 28 65 76 65 6e 74 | 2e 61 74 74 72 4e 61 6d |f (event|.attrNam|
|00003e80| 65 20 3d 3d 20 22 63 6f | 6c 6c 61 70 73 65 64 22 |e == "co|llapsed"|
|00003e90| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|00003ea0| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00003eb0| 65 6e 74 42 79 49 64 28 | 22 66 6f 6c 64 65 72 50 |entById(|"folderP|
|00003ec0| 61 6e 65 42 6f 78 22 29 | 0a 20 20 20 20 20 20 20 |aneBox")|. |
|00003ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2e 72 65 | | .re|
|00003ee0| 6d 6f 76 65 41 74 74 72 | 69 62 75 74 65 28 22 63 |moveAttr|ibute("c|
|00003ef0| 6f 6c 6c 61 70 73 65 64 | 22 29 3b 0a 20 20 20 20 |ollapsed|");. |
|00003f00| 20 20 20 20 7d 0a 20 20 | 20 20 7d 0a 0a 20 20 20 | }. | }.. |
|00003f10| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00003f20| 6d 65 6e 74 42 79 49 64 | 28 22 6c 74 6e 4d 6f 64 |mentById|("ltnMod|
|00003f30| 65 42 6f 78 22 29 2e 61 | 64 64 45 76 65 6e 74 4c |eBox").a|ddEventL|
|00003f40| 69 73 74 65 6e 65 72 28 | 22 44 4f 4d 41 74 74 72 |istener(|"DOMAttr|
|00003f50| 4d 6f 64 69 66 69 65 64 | 22 2c 0a 20 20 20 20 20 |Modified|",. |
|00003f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f90| 20 20 20 20 20 20 6d 6f | 64 65 42 6f 78 41 74 74 | mo|deBoxAtt|
|00003fa0| 72 4d 6f 64 69 66 69 65 | 64 2c 0a 20 20 20 20 20 |rModifie|d,. |
|00003fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fe0| 20 20 20 20 20 20 74 72 | 75 65 29 3b 0a 0a 20 20 | tr|ue);.. |
|00003ff0| 20 20 2f 2f 20 66 69 6e | 64 20 6c 61 73 74 20 73 | // fin|d last s|
|00004000| 68 6f 77 6e 20 63 61 6c | 65 6e 64 61 72 20 76 69 |hown cal|endar vi|
|00004010| 65 77 20 28 70 65 72 73 | 69 73 74 3d 22 63 68 65 |ew (pers|ist="che|
|00004020| 63 6b 65 64 22 29 0a 20 | 20 20 20 76 61 72 20 61 |cked"). | var a|
|00004030| 76 61 69 6c 61 62 6c 65 | 56 69 65 77 73 20 3d 20 |vailable|Views = |
|00004040| 67 65 74 56 69 65 77 44 | 65 63 6b 28 29 3b 0a 20 |getViewD|eck();. |
|00004050| 20 20 20 76 61 72 20 6e | 75 6d 43 68 69 6c 64 73 | var n|umChilds|
|00004060| 20 3d 20 61 76 61 69 6c | 61 62 6c 65 56 69 65 77 | = avail|ableView|
|00004070| 73 2e 63 68 69 6c 64 4e | 6f 64 65 73 2e 6c 65 6e |s.childN|odes.len|
|00004080| 67 74 68 3b 0a 20 20 20 | 20 66 6f 72 20 28 76 61 |gth;. | for (va|
|00004090| 72 20 69 20 3d 20 30 3b | 20 69 20 3c 20 6e 75 6d |r i = 0;| i < num|
|000040a0| 43 68 69 6c 64 73 3b 20 | 69 2b 2b 29 20 7b 0a 20 |Childs; |i++) {. |
|000040b0| 20 20 20 20 20 20 20 76 | 61 72 20 76 69 65 77 20 | v|ar view |
|000040c0| 3d 20 61 76 61 69 6c 61 | 62 6c 65 56 69 65 77 73 |= availa|bleViews|
|000040d0| 2e 63 68 69 6c 64 4e 6f | 64 65 73 5b 69 5d 3b 0a |.childNo|des[i];.|
|000040e0| 20 20 20 20 20 20 20 20 | 76 61 72 20 63 6f 6d 6d | |var comm|
|000040f0| 61 6e 64 20 3d 20 64 6f | 63 75 6d 65 6e 74 2e 67 |and = do|cument.g|
|00004100| 65 74 45 6c 65 6d 65 6e | 74 42 79 49 64 28 76 69 |etElemen|tById(vi|
|00004110| 65 77 2e 69 64 2b 22 2d | 63 6f 6d 6d 61 6e 64 22 |ew.id+"-|command"|
|00004120| 29 3b 0a 20 20 20 20 20 | 20 20 20 69 66 20 28 63 |);. | if (c|
|00004130| 6f 6d 6d 61 6e 64 20 26 | 26 20 63 6f 6d 6d 61 6e |ommand &|& comman|
|00004140| 64 2e 67 65 74 41 74 74 | 72 69 62 75 74 65 28 22 |d.getAtt|ribute("|
|00004150| 63 68 65 63 6b 65 64 22 | 29 20 3d 3d 20 22 74 72 |checked"|) == "tr|
|00004160| 75 65 22 29 20 7b 0a 20 | 20 20 20 20 20 20 20 20 |ue") {. | |
|00004170| 20 20 20 67 4c 61 73 74 | 53 68 6f 77 6e 43 61 6c | gLast|ShownCal|
|00004180| 65 6e 64 61 72 56 69 65 | 77 20 3d 20 76 69 65 77 |endarVie|w = view|
|00004190| 2e 69 64 2e 73 75 62 73 | 74 72 69 6e 67 28 30 2c |.id.subs|tring(0,|
|000041a0| 20 76 69 65 77 2e 69 64 | 2e 69 6e 64 65 78 4f 66 | view.id|.indexOf|
|000041b0| 28 27 2d 27 29 29 3b 0a | 20 20 20 20 20 20 20 20 |('-'));.| |
|000041c0| 20 20 20 20 62 72 65 61 | 6b 3b 0a 20 20 20 20 20 | brea|k;. |
|000041d0| 20 20 20 7d 0a 20 20 20 | 20 7d 0a 20 20 20 20 69 | }. | }. i|
|000041e0| 66 20 28 21 67 4c 61 73 | 74 53 68 6f 77 6e 43 61 |f (!gLas|tShownCa|
|000041f0| 6c 65 6e 64 61 72 56 69 | 65 77 29 20 7b 0a 20 20 |lendarVi|ew) {. |
|00004200| 20 20 20 20 20 20 67 4c | 61 73 74 53 68 6f 77 6e | gL|astShown|
|00004210| 43 61 6c 65 6e 64 61 72 | 56 69 65 77 20 3d 20 27 |Calendar|View = '|
|00004220| 6d 6f 6e 74 68 27 3b 0a | 20 20 20 20 7d 0a 0a 20 |month';.| }.. |
|00004230| 20 20 20 67 4d 69 6e 69 | 4d 6f 6e 74 68 4c 6f 61 | gMini|MonthLoa|
|00004240| 64 69 6e 67 20 3d 20 74 | 72 75 65 3b 0a 0a 20 20 |ding = t|rue;.. |
|00004250| 20 20 76 61 72 20 74 6f | 64 61 79 20 3d 20 6e 65 | var to|day = ne|
|00004260| 77 20 44 61 74 65 28 29 | 3b 0a 20 20 20 20 76 61 |w Date()|;. va|
|00004270| 72 20 6e 65 78 74 6d 6f | 20 3d 20 6e 65 78 74 4d |r nextmo| = nextM|
|00004280| 6f 6e 74 68 28 74 6f 64 | 61 79 29 3b 0a 0a 20 20 |onth(tod|ay);.. |
|00004290| 20 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c | docume|nt.getEl|
|000042a0| 65 6d 65 6e 74 42 79 49 | 64 28 22 6c 74 6e 4d 69 |ementByI|d("ltnMi|
|000042b0| 6e 69 6d 6f 6e 74 68 22 | 29 2e 76 61 6c 75 65 20 |nimonth"|).value |
|000042c0| 3d 20 74 6f 64 61 79 3b | 0a 20 20 20 20 64 6f 63 |= today;|. doc|
|000042d0| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|000042e0| 42 79 49 64 28 22 6c 74 | 6e 44 61 74 65 54 65 78 |ById("lt|nDateTex|
|000042f0| 74 50 69 63 6b 65 72 22 | 29 2e 76 61 6c 75 65 20 |tPicker"|).value |
|00004300| 3d 20 74 6f 64 61 79 3b | 0a 0a 20 20 20 20 67 4d |= today;|.. gM|
|00004310| 69 6e 69 4d 6f 6e 74 68 | 4c 6f 61 64 69 6e 67 20 |iniMonth|Loading |
|00004320| 3d 20 66 61 6c 73 65 3b | 0a 0a 20 20 20 20 2f 2f |= false;|.. //|
|00004330| 20 6e 75 6b 65 20 74 68 | 65 20 6f 6e 6c 6f 61 64 | nuke th|e onload|
|00004340| 2c 20 6f 72 20 77 65 20 | 67 65 74 20 63 61 6c 6c |, or we |get call|
|00004350| 65 64 20 65 76 65 72 79 | 20 74 69 6d 65 20 74 68 |ed every| time th|
|00004360| 65 72 65 27 73 0a 20 20 | 20 20 2f 2f 20 61 6e 79 |ere's. | // any|
|00004370| 20 6c 6f 61 64 20 74 68 | 61 74 20 6f 63 63 75 72 | load th|at occur|
|00004380| 73 0a 20 20 20 20 64 6f | 63 75 6d 65 6e 74 2e 72 |s. do|cument.r|
|00004390| 65 6d 6f 76 65 45 76 65 | 6e 74 4c 69 73 74 65 6e |emoveEve|ntListen|
|000043a0| 65 72 28 22 6c 6f 61 64 | 22 2c 20 6c 74 6e 4f 6e |er("load|", ltnOn|
|000043b0| 4c 6f 61 64 2c 20 74 72 | 75 65 29 3b 0a 0a 20 20 |Load, tr|ue);.. |
|000043c0| 20 20 2f 2f 20 48 69 64 | 65 20 74 68 65 20 63 61 | // Hid|e the ca|
|000043d0| 6c 65 6e 64 61 72 20 76 | 69 65 77 20 73 6f 20 69 |lendar v|iew so i|
|000043e0| 74 20 64 6f 65 73 6e 27 | 74 20 70 75 73 68 20 74 |t doesn'|t push t|
|000043f0| 68 65 20 73 74 61 74 75 | 73 2d 62 61 72 20 6f 66 |he statu|s-bar of|
|00004400| 66 73 63 72 65 65 6e 0a | 20 20 20 20 63 6f 6c 6c |fscreen.| coll|
|00004410| 61 70 73 65 45 6c 65 6d | 65 6e 74 28 64 6f 63 75 |apseElem|ent(docu|
|00004420| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00004430| 79 49 64 28 22 63 61 6c | 65 6e 64 61 72 2d 76 69 |yId("cal|endar-vi|
|00004440| 65 77 2d 62 6f 78 22 29 | 29 3b 0a 0a 20 20 20 20 |ew-box")|);.. |
|00004450| 2f 2f 20 66 69 72 65 20 | 75 70 20 74 68 65 20 61 |// fire |up the a|
|00004460| 6c 61 72 6d 20 73 65 72 | 76 69 63 65 0a 20 20 20 |larm ser|vice. |
|00004470| 20 76 61 72 20 61 6c 61 | 72 6d 53 76 63 20 3d 20 | var ala|rmSvc = |
|00004480| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 63 6c 61 73 73 |Componen|ts.class|
|00004490| 65 73 5b 22 40 6d 6f 7a | 69 6c 6c 61 2e 6f 72 67 |es["@moz|illa.org|
|000044a0| 2f 63 61 6c 65 6e 64 61 | 72 2f 61 6c 61 72 6d 2d |/calenda|r/alarm-|
|000044b0| 73 65 72 76 69 63 65 3b | 31 22 5d 0a 20 20 20 20 |service;|1"]. |
|000044c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2e | | .|
|000044d0| 67 65 74 53 65 72 76 69 | 63 65 28 43 6f 6d 70 6f |getServi|ce(Compo|
|000044e0| 6e 65 6e 74 73 2e 69 6e | 74 65 72 66 61 63 65 73 |nents.in|terfaces|
|000044f0| 2e 63 61 6c 49 41 6c 61 | 72 6d 53 65 72 76 69 63 |.calIAla|rmServic|
|00004500| 65 29 3b 0a 20 20 20 20 | 61 6c 61 72 6d 53 76 63 |e);. |alarmSvc|
|00004510| 2e 74 69 6d 65 7a 6f 6e | 65 20 3d 20 63 61 6c 65 |.timezon|e = cale|
|00004520| 6e 64 61 72 44 65 66 61 | 75 6c 74 54 69 6d 65 7a |ndarDefa|ultTimez|
|00004530| 6f 6e 65 28 29 3b 0a 20 | 20 20 20 61 6c 61 72 6d |one();. | alarm|
|00004540| 53 76 63 2e 73 74 61 72 | 74 75 70 28 29 3b 0a 0a |Svc.star|tup();..|
|00004550| 20 20 20 20 2f 2f 20 41 | 64 64 20 61 6e 20 75 6e | // A|dd an un|
|00004560| 6c 6f 61 64 20 66 75 6e | 63 74 69 6f 6e 20 74 6f |load fun|ction to|
|00004570| 20 74 68 65 20 77 69 6e | 64 6f 77 20 73 6f 20 77 | the win|dow so w|
|00004580| 65 20 64 6f 6e 27 74 20 | 6c 65 61 6b 20 61 6e 79 |e don't |leak any|
|00004590| 20 6c 69 73 74 65 6e 65 | 72 73 0a 20 20 20 20 64 | listene|rs. d|
|000045a0| 6f 63 75 6d 65 6e 74 2e | 67 65 74 45 6c 65 6d 65 |ocument.|getEleme|
|000045b0| 6e 74 42 79 49 64 28 22 | 6d 65 73 73 65 6e 67 65 |ntById("|messenge|
|000045c0| 72 57 69 6e 64 6f 77 22 | 29 0a 20 20 20 20 20 20 |rWindow"|). |
|000045d0| 20 20 20 20 20 20 2e 61 | 64 64 45 76 65 6e 74 4c | .a|ddEventL|
|000045e0| 69 73 74 65 6e 65 72 28 | 22 75 6e 6c 6f 61 64 22 |istener(|"unload"|
|000045f0| 2c 20 6c 74 6e 46 69 6e | 69 73 68 2c 20 66 61 6c |, ltnFin|ish, fal|
|00004600| 73 65 29 3b 0a 0a 20 20 | 20 20 64 6f 63 75 6d 65 |se);.. | docume|
|00004610| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00004620| 64 28 22 64 69 73 70 6c | 61 79 44 65 63 6b 22 29 |d("displ|ayDeck")|
|00004630| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 2e 61 64 |. | .ad|
|00004640| 64 45 76 65 6e 74 4c 69 | 73 74 65 6e 65 72 28 22 |dEventLi|stener("|
|00004650| 64 61 79 73 65 6c 65 63 | 74 22 2c 20 6f 62 73 65 |dayselec|t", obse|
|00004660| 72 76 65 56 69 65 77 44 | 61 79 53 65 6c 65 63 74 |rveViewD|aySelect|
|00004670| 2c 20 66 61 6c 73 65 29 | 3b 0a 0a 20 20 20 20 70 |, false)|;.. p|
|00004680| 72 65 70 61 72 65 43 61 | 6c 65 6e 64 61 72 54 6f |repareCa|lendarTo|
|00004690| 44 6f 55 6e 69 66 69 6e | 64 65 72 28 29 3b 0a 0a |DoUnifin|der();..|
|000046a0| 20 20 20 20 2f 2f 20 4d | 61 6b 65 20 73 75 72 65 | // M|ake sure|
|000046b0| 20 77 65 20 75 70 64 61 | 74 65 20 6f 75 72 73 65 | we upda|te ourse|
|000046c0| 6c 76 65 73 20 69 66 20 | 74 68 65 20 70 72 6f 67 |lves if |the prog|
|000046d0| 72 61 6d 20 73 74 61 79 | 73 20 6f 70 65 6e 20 6f |ram stay|s open o|
|000046e0| 76 65 72 20 6d 69 64 6e | 69 67 68 74 0a 20 20 20 |ver midn|ight. |
|000046f0| 20 73 63 68 65 64 75 6c | 65 4d 69 64 6e 69 67 68 | schedul|eMidnigh|
|00004700| 74 55 70 64 61 74 65 28 | 72 65 66 72 65 73 68 55 |tUpdate(|refreshU|
|00004710| 49 42 69 74 73 29 3b 0a | 0a 20 20 20 20 69 66 20 |IBits);.|. if |
|00004720| 28 67 65 74 50 72 65 66 | 53 61 66 65 28 22 63 61 |(getPref|Safe("ca|
|00004730| 6c 65 6e 64 61 72 2e 70 | 72 6f 74 6f 74 79 70 65 |lendar.p|rototype|
|00004740| 73 2e 77 63 61 70 22 2c | 20 66 61 6c 73 65 29 29 |s.wcap",| false))|
|00004750| 20 7b 0a 20 20 20 20 20 | 20 20 20 64 6f 63 75 6d | {. | docum|
|00004760| 65 6e 74 2e 6c 6f 61 64 | 4f 76 65 72 6c 61 79 28 |ent.load|Overlay(|
|00004770| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 22 63 68 |. | "ch|
|00004780| 72 6f 6d 65 3a 2f 2f 6c | 69 67 68 74 6e 69 6e 67 |rome://l|ightning|
|00004790| 2f 63 6f 6e 74 65 6e 74 | 2f 73 75 6e 2d 6d 65 73 |/content|/sun-mes|
|000047a0| 73 65 6e 67 65 72 2d 6f | 76 65 72 6c 61 79 2d 73 |senger-o|verlay-s|
|000047b0| 69 64 65 62 61 72 2e 78 | 75 6c 22 2c 0a 20 20 20 |idebar.x|ul",. |
|000047c0| 20 20 20 20 20 20 20 20 | 20 6e 75 6c 6c 29 3b 0a | | null);.|
|000047d0| 20 20 20 20 7d 0a 0a 20 | 20 20 20 2f 2f 20 77 65 | }.. | // we|
|000047e0| 20 6e 65 65 64 20 74 6f | 20 70 75 74 20 6f 75 72 | need to| put our|
|000047f0| 20 6e 65 77 20 63 6f 6d | 6d 61 6e 64 20 63 6f 6e | new com|mand con|
|00004800| 74 72 6f 6c 6c 65 72 20 | 2a 62 65 66 6f 72 65 2a |troller |*before*|
|00004810| 20 74 68 65 20 6f 6e 65 | 20 74 68 61 74 0a 20 20 | the one| that. |
|00004820| 20 20 2f 2f 20 67 65 74 | 73 20 69 6e 73 74 61 6c | // get|s instal|
|00004830| 6c 65 64 20 62 79 20 74 | 68 75 6e 64 65 72 62 69 |led by t|hunderbi|
|00004840| 72 64 2e 20 73 69 6e 63 | 65 20 77 65 20 67 65 74 |rd. sinc|e we get|
|00004850| 20 63 61 6c 6c 65 64 20 | 70 72 65 74 74 79 20 65 | called |pretty e|
|00004860| 61 72 6c 79 0a 20 20 20 | 20 2f 2f 20 64 75 72 69 |arly. | // duri|
|00004870| 6e 67 20 73 74 61 72 74 | 75 70 20 77 65 20 6e 65 |ng start|up we ne|
|00004880| 65 64 20 74 6f 20 69 6e | 73 74 61 6c 6c 20 74 68 |ed to in|stall th|
|00004890| 65 20 66 75 6e 63 74 69 | 6f 6e 20 62 65 6c 6f 77 |e functi|on below|
|000048a0| 20 61 73 20 61 20 63 61 | 6c 6c 62 61 63 6b 0a 20 | as a ca|llback. |
|000048b0| 20 20 20 2f 2f 20 74 68 | 61 74 20 70 65 72 69 6f | // th|at perio|
|000048c0| 64 69 63 61 6c 6c 79 20 | 63 68 65 63 6b 73 20 77 |dically |checks w|
|000048d0| 68 65 6e 20 74 68 65 20 | 6f 72 69 67 69 6e 61 6c |hen the |original|
|000048e0| 20 74 68 75 6e 64 65 72 | 62 69 72 64 20 63 6f 6e | thunder|bird con|
|000048f0| 74 72 6f 6c 6c 65 72 0a | 20 20 20 20 2f 2f 20 67 |troller.| // g|
|00004900| 65 74 73 20 61 6c 69 76 | 65 2e 20 70 6c 65 61 73 |ets aliv|e. pleas|
|00004910| 65 20 6e 6f 74 65 20 74 | 68 61 74 20 73 65 74 54 |e note t|hat setT|
|00004920| 69 6d 65 6f 75 74 20 77 | 69 74 68 20 61 20 76 61 |imeout w|ith a va|
|00004930| 6c 75 65 20 6f 66 20 30 | 20 6d 65 61 6e 73 20 74 |lue of 0| means t|
|00004940| 68 61 74 0a 20 20 20 20 | 2f 2f 20 77 65 20 6c 65 |hat. |// we le|
|00004950| 61 76 65 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ave the |current |
|00004960| 74 68 72 65 61 64 20 69 | 6e 20 6f 72 64 65 72 20 |thread i|n order |
|00004970| 74 6f 20 72 65 2d 65 6e | 74 65 72 20 74 68 65 20 |to re-en|ter the |
|00004980| 6d 65 73 73 61 67 65 20 | 6c 6f 6f 70 2e 0a 20 20 |message |loop.. |
|00004990| 20 20 76 61 72 20 69 6e | 6a 65 63 74 43 6f 6d 6d | var in|jectComm|
|000049a0| 61 6e 64 43 6f 6e 74 72 | 6f 6c 6c 65 72 20 3d 20 |andContr|oller = |
|000049b0| 66 75 6e 63 74 69 6f 6e | 20 69 6e 6a 65 63 74 28 |function| inject(|
|000049c0| 29 20 7b 0a 20 20 20 20 | 20 20 76 61 72 20 63 6f |) {. | var co|
|000049d0| 6e 74 72 6f 6c 6c 65 72 | 20 3d 20 74 6f 70 2e 63 |ntroller| = top.c|
|000049e0| 6f 6e 74 72 6f 6c 6c 65 | 72 73 2e 67 65 74 43 6f |ontrolle|rs.getCo|
|000049f0| 6e 74 72 6f 6c 6c 65 72 | 46 6f 72 43 6f 6d 6d 61 |ntroller|ForComma|
|00004a00| 6e 64 28 22 63 6d 64 5f | 75 6e 64 6f 22 29 3b 0a |nd("cmd_|undo");.|
|00004a10| 20 20 20 20 20 20 69 66 | 20 28 21 63 6f 6e 74 72 | if| (!contr|
|00004a20| 6f 6c 6c 65 72 29 20 7b | 0a 20 20 20 20 20 20 20 |oller) {|. |
|00004a30| 20 73 65 74 54 69 6d 65 | 6f 75 74 28 69 6e 6a 65 | setTime|out(inje|
|00004a40| 63 74 43 6f 6d 6d 61 6e | 64 43 6f 6e 74 72 6f 6c |ctComman|dControl|
|00004a50| 6c 65 72 2c 20 30 29 3b | 0a 20 20 20 20 20 20 7d |ler, 0);|. }|
|00004a60| 20 65 6c 73 65 20 7b 0a | 20 20 20 20 20 20 20 20 | else {.| |
|00004a70| 43 61 6c 65 6e 64 61 72 | 43 6f 6e 74 72 6f 6c 6c |Calendar|Controll|
|00004a80| 65 72 2e 64 65 66 61 75 | 6c 74 43 6f 6e 74 72 6f |er.defau|ltContro|
|00004a90| 6c 6c 65 72 20 3d 20 63 | 6f 6e 74 72 6f 6c 6c 65 |ller = c|ontrolle|
|00004aa0| 72 3b 0a 20 20 20 20 20 | 20 20 20 74 6f 70 2e 63 |r;. | top.c|
|00004ab0| 6f 6e 74 72 6f 6c 6c 65 | 72 73 2e 69 6e 73 65 72 |ontrolle|rs.inser|
|00004ac0| 74 43 6f 6e 74 72 6f 6c | 6c 65 72 41 74 28 30 2c |tControl|lerAt(0,|
|00004ad0| 20 43 61 6c 65 6e 64 61 | 72 43 6f 6e 74 72 6f 6c | Calenda|rControl|
|00004ae0| 6c 65 72 29 3b 0a 20 20 | 20 20 20 20 7d 0a 20 20 |ler);. | }. |
|00004af0| 20 20 7d 0a 20 20 20 20 | 69 6e 6a 65 63 74 43 6f | }. |injectCo|
|00004b00| 6d 6d 61 6e 64 43 6f 6e | 74 72 6f 6c 6c 65 72 28 |mmandCon|troller(|
|00004b10| 29 3b 0a 0a 20 20 20 20 | 67 65 74 56 69 65 77 44 |);.. |getViewD|
|00004b20| 65 63 6b 28 29 2e 61 64 | 64 45 76 65 6e 74 4c 69 |eck().ad|dEventLi|
|00004b30| 73 74 65 6e 65 72 28 22 | 69 74 65 6d 73 65 6c 65 |stener("|itemsele|
|00004b40| 63 74 22 2c 20 6f 6e 53 | 65 6c 65 63 74 69 6f 6e |ct", onS|election|
|00004b50| 43 68 61 6e 67 65 64 2c | 20 74 72 75 65 29 3b 0a |Changed,| true);.|
|00004b60| 7d 0a 0a 66 75 6e 63 74 | 69 6f 6e 20 6f 6e 53 65 |}..funct|ion onSe|
|00004b70| 6c 65 63 74 69 6f 6e 43 | 68 61 6e 67 65 64 28 61 |lectionC|hanged(a|
|00004b80| 45 76 65 6e 74 29 20 7b | 0a 20 20 76 61 72 20 65 |Event) {|. var e|
|00004b90| 6c 65 6d 65 6e 74 73 20 | 3d 20 64 6f 63 75 6d 65 |lements |= docume|
|00004ba0| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 73 42 79 |nt.getEl|ementsBy|
|00004bb0| 41 74 74 72 69 62 75 74 | 65 28 22 64 69 73 61 62 |Attribut|e("disab|
|00004bc0| 6c 65 64 77 68 65 6e 6e | 6f 65 76 65 6e 74 73 73 |ledwhenn|oeventss|
|00004bd0| 65 6c 65 63 74 65 64 22 | 2c 20 22 74 72 75 65 22 |elected"|, "true"|
|00004be0| 29 3b 0a 20 20 76 61 72 | 20 73 65 6c 65 63 74 65 |);. var| selecte|
|00004bf0| 64 49 74 65 6d 73 20 3d | 20 61 45 76 65 6e 74 2e |dItems =| aEvent.|
|00004c00| 64 65 74 61 69 6c 3b 0a | 20 20 66 6f 72 20 28 76 |detail;.| for (v|
|00004c10| 61 72 20 69 20 3d 20 30 | 3b 20 69 20 3c 20 65 6c |ar i = 0|; i < el|
|00004c20| 65 6d 65 6e 74 73 2e 6c | 65 6e 67 74 68 3b 20 69 |ements.l|ength; i|
|00004c30| 2b 2b 29 20 7b 0a 20 20 | 20 20 69 66 20 28 73 65 |++) {. | if (se|
|00004c40| 6c 65 63 74 65 64 49 74 | 65 6d 73 2e 6c 65 6e 67 |lectedIt|ems.leng|
|00004c50| 74 68 20 3e 3d 20 31 29 | 20 7b 0a 20 20 20 20 20 |th >= 1)| {. |
|00004c60| 20 65 6c 65 6d 65 6e 74 | 73 5b 69 5d 2e 72 65 6d | element|s[i].rem|
|00004c70| 6f 76 65 41 74 74 72 69 | 62 75 74 65 28 22 64 69 |oveAttri|bute("di|
|00004c80| 73 61 62 6c 65 64 22 29 | 3b 0a 20 20 20 20 7d 20 |sabled")|;. } |
|00004c90| 65 6c 73 65 20 7b 0a 20 | 20 20 20 20 20 65 6c 65 |else {. | ele|
|00004ca0| 6d 65 6e 74 73 5b 69 5d | 2e 73 65 74 41 74 74 72 |ments[i]|.setAttr|
|00004cb0| 69 62 75 74 65 28 22 64 | 69 73 61 62 6c 65 64 22 |ibute("d|isabled"|
|00004cc0| 2c 20 22 74 72 75 65 22 | 29 3b 0a 20 20 20 20 7d |, "true"|);. }|
|00004cd0| 0a 20 20 7d 0a 20 20 64 | 6f 63 75 6d 65 6e 74 2e |. }. d|ocument.|
|00004ce0| 63 6f 6d 6d 61 6e 64 44 | 69 73 70 61 74 63 68 65 |commandD|ispatche|
|00004cf0| 72 2e 75 70 64 61 74 65 | 43 6f 6d 6d 61 6e 64 73 |r.update|Commands|
|00004d00| 28 27 6d 61 69 6c 2d 74 | 6f 6f 6c 62 61 72 27 29 |('mail-t|oolbar')|
|00004d10| 3b 0a 20 20 64 6f 63 75 | 6d 65 6e 74 2e 63 6f 6d |;. docu|ment.com|
|00004d20| 6d 61 6e 64 44 69 73 70 | 61 74 63 68 65 72 2e 75 |mandDisp|atcher.u|
|00004d30| 70 64 61 74 65 43 6f 6d | 6d 61 6e 64 73 28 27 63 |pdateCom|mands('c|
|00004d40| 61 6c 65 6e 64 61 72 5f | 63 6f 6d 6d 61 6e 64 73 |alendar_|commands|
|00004d50| 27 29 3b 0a 7d 0a 0a 2f | 2a 20 43 61 6c 6c 65 64 |');.}../|* Called|
|00004d60| 20 61 74 20 6d 69 64 6e | 69 67 68 74 20 74 6f 20 | at midn|ight to |
|00004d70| 74 65 6c 6c 20 75 73 20 | 74 6f 20 72 65 64 72 61 |tell us |to redra|
|00004d80| 77 20 64 61 74 65 2d 73 | 70 65 63 69 66 69 63 20 |w date-s|pecific |
|00004d90| 77 69 64 67 65 74 73 2e | 20 20 44 6f 20 4e 4f 54 |widgets.| Do NOT|
|00004da0| 20 63 61 6c 6c 0a 20 2a | 20 74 68 69 73 20 66 6f | call. *| this fo|
|00004db0| 72 20 6e 6f 72 6d 61 6c | 20 72 65 66 72 65 73 68 |r normal| refresh|
|00004dc0| 2c 20 73 69 6e 63 65 20 | 69 74 20 61 6c 73 6f 20 |, since |it also |
|00004dd0| 63 61 6c 6c 73 20 73 63 | 68 65 64 75 6c 65 4d 69 |calls sc|heduleMi|
|00004de0| 64 6e 69 67 68 74 52 65 | 66 72 65 73 68 2e 0a 20 |dnightRe|fresh.. |
|00004df0| 2a 2f 0a 66 75 6e 63 74 | 69 6f 6e 20 72 65 66 72 |*/.funct|ion refr|
|00004e00| 65 73 68 55 49 42 69 74 | 73 28 29 20 7b 0a 20 20 |eshUIBit|s() {. |
|00004e10| 20 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c | docume|nt.getEl|
|00004e20| 65 6d 65 6e 74 42 79 49 | 64 28 22 6c 74 6e 4d 69 |ementByI|d("ltnMi|
|00004e30| 6e 69 6d 6f 6e 74 68 22 | 29 2e 72 65 66 72 65 73 |nimonth"|).refres|
|00004e40| 68 44 69 73 70 6c 61 79 | 28 29 3b 0a 0a 20 20 20 |hDisplay|();.. |
|00004e50| 20 2f 2f 20 72 65 66 72 | 65 73 68 20 74 68 65 20 | // refr|esh the |
|00004e60| 63 75 72 72 65 6e 74 20 | 76 69 65 77 2c 20 69 66 |current |view, if|
|00004e70| 20 69 74 20 68 61 73 20 | 65 76 65 72 20 62 65 65 | it has |ever bee|
|00004e80| 6e 20 73 68 6f 77 6e 0a | 20 20 20 20 76 61 72 20 |n shown.| var |
|00004e90| 63 56 69 65 77 20 3d 20 | 63 75 72 72 65 6e 74 56 |cView = |currentV|
|00004ea0| 69 65 77 28 29 3b 0a 20 | 20 20 20 69 66 20 28 63 |iew();. | if (c|
|00004eb0| 56 69 65 77 2e 69 6e 69 | 74 69 61 6c 69 7a 65 64 |View.ini|tialized|
|00004ec0| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 63 56 69 65 |) {. | cVie|
|00004ed0| 77 2e 67 6f 54 6f 44 61 | 79 28 63 56 69 65 77 2e |w.goToDa|y(cView.|
|00004ee0| 73 65 6c 65 63 74 65 64 | 44 61 79 29 3b 0a 20 20 |selected|Day);. |
|00004ef0| 20 20 7d 0a 0a 20 20 20 | 20 69 66 20 28 54 6f 64 | }.. | if (Tod|
|00004f00| 61 79 50 61 6e 65 2e 73 | 68 6f 77 73 59 65 73 74 |ayPane.s|howsYest|
|00004f10| 65 72 64 61 79 28 29 29 | 20 7b 0a 20 20 20 20 20 |erday())| {. |
|00004f20| 20 54 6f 64 61 79 50 61 | 6e 65 2e 73 65 74 44 61 | TodayPa|ne.setDa|
|00004f30| 79 28 74 6f 64 61 79 28 | 29 29 3b 0a 20 20 20 20 |y(today(|));. |
|00004f40| 7d 0a 20 20 20 20 2f 2f | 20 73 63 68 65 64 75 6c |}. //| schedul|
|00004f50| 65 20 6f 75 72 20 6e 65 | 78 74 20 75 70 64 61 74 |e our ne|xt updat|
|00004f60| 65 2e 2e 2e 0a 20 20 20 | 20 73 63 68 65 64 75 6c |e.... | schedul|
|00004f70| 65 4d 69 64 6e 69 67 68 | 74 55 70 64 61 74 65 28 |eMidnigh|tUpdate(|
|00004f80| 72 65 66 72 65 73 68 55 | 49 42 69 74 73 29 3b 0a |refreshU|IBits);.|
|00004f90| 7d 0a 0a 66 75 6e 63 74 | 69 6f 6e 20 73 68 6f 77 |}..funct|ion show|
|00004fa0| 43 61 6c 65 6e 64 61 72 | 56 69 65 77 28 74 79 70 |Calendar|View(typ|
|00004fb0| 65 29 0a 7b 0a 20 20 20 | 20 67 4c 61 73 74 53 68 |e).{. | gLastSh|
|00004fc0| 6f 77 6e 43 61 6c 65 6e | 64 61 72 56 69 65 77 20 |ownCalen|darView |
|00004fd0| 3d 20 74 79 70 65 3b 0a | 0a 20 20 20 20 69 66 20 |= type;.|. if |
|00004fe0| 28 67 43 75 72 72 65 6e | 74 4d 6f 64 65 20 21 3d |(gCurren|tMode !=|
|00004ff0| 20 27 63 61 6c 65 6e 64 | 61 72 27 29 20 7b 0a 20 | 'calend|ar') {. |
|00005000| 20 20 20 20 20 20 20 2f | 2f 20 54 68 69 73 20 66 | /|/ This f|
|00005010| 75 6e 63 74 69 6f 6e 20 | 69 6e 20 74 75 72 6e 20 |unction |in turn |
|00005020| 63 61 6c 6c 73 20 73 68 | 6f 77 43 61 6c 65 6e 64 |calls sh|owCalend|
|00005030| 61 72 56 69 65 77 28 29 | 2c 20 73 6f 20 72 65 74 |arView()|, so ret|
|00005040| 75 72 6e 20 61 66 74 65 | 72 77 61 72 64 73 2e 0a |urn afte|rwards..|
|00005050| 20 20 20 20 20 20 20 20 | 6c 74 6e 53 77 69 74 63 | |ltnSwitc|
|00005060| 68 32 43 61 6c 65 6e 64 | 61 72 28 29 3b 0a 20 20 |h2Calend|ar();. |
|00005070| 20 20 20 20 20 20 72 65 | 74 75 72 6e 3b 0a 20 20 | re|turn;. |
|00005080| 20 20 7d 0a 0a 20 20 20 | 20 2f 2f 20 49 66 20 77 | }.. | // If w|
|00005090| 65 20 67 6f 74 20 74 68 | 69 73 20 63 61 6c 6c 20 |e got th|is call |
|000050a0| 77 68 69 6c 65 20 61 20 | 6d 61 69 6c 2d 76 69 65 |while a |mail-vie|
|000050b0| 77 20 69 73 20 62 65 69 | 6e 67 20 73 68 6f 77 6e |w is bei|ng shown|
|000050c0| 2c 20 77 65 20 6e 65 65 | 64 20 74 6f 0a 20 20 20 |, we nee|d to. |
|000050d0| 20 2f 2f 20 68 69 64 65 | 20 61 6c 6c 20 6f 66 20 | // hide| all of |
|000050e0| 74 68 65 20 6d 61 69 6c | 20 73 74 75 66 66 20 73 |the mail| stuff s|
|000050f0| 6f 20 77 65 20 68 61 76 | 65 20 72 6f 6f 6d 20 74 |o we hav|e room t|
|00005100| 6f 20 64 69 73 70 6c 61 | 79 20 74 68 65 20 63 61 |o displa|y the ca|
|00005110| 6c 65 6e 64 61 72 0a 20 | 20 20 20 76 61 72 20 63 |lendar. | var c|
|00005120| 61 6c 65 6e 64 61 72 56 | 69 65 77 42 6f 78 20 3d |alendarV|iewBox =|
|00005130| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00005140| 6d 65 6e 74 42 79 49 64 | 28 22 63 61 6c 65 6e 64 |mentById|("calend|
|00005150| 61 72 2d 76 69 65 77 2d | 62 6f 78 22 29 3b 0a 20 |ar-view-|box");. |
|00005160| 20 20 20 69 66 20 28 63 | 61 6c 65 6e 64 61 72 56 | if (c|alendarV|
|00005170| 69 65 77 42 6f 78 2e 73 | 74 79 6c 65 2e 76 69 73 |iewBox.s|tyle.vis|
|00005180| 69 62 69 6c 69 74 79 20 | 3d 3d 20 22 63 6f 6c 6c |ibility |== "coll|
|00005190| 61 70 73 65 22 29 20 7b | 0a 20 20 20 20 20 20 20 |apse") {|. |
|000051a0| 20 63 6f 6c 6c 61 70 73 | 65 45 6c 65 6d 65 6e 74 | collaps|eElement|
|000051b0| 28 47 65 74 4d 65 73 73 | 61 67 65 50 61 6e 65 28 |(GetMess|agePane(|
|000051c0| 29 29 3b 0a 20 20 20 20 | 20 20 20 20 63 6f 6c 6c |));. | coll|
|000051d0| 61 70 73 65 45 6c 65 6d | 65 6e 74 28 64 6f 63 75 |apseElem|ent(docu|
|000051e0| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|000051f0| 79 49 64 28 22 74 68 72 | 65 61 64 70 61 6e 65 2d |yId("thr|eadpane-|
|00005200| 73 70 6c 69 74 74 65 72 | 22 29 29 3b 0a 20 20 20 |splitter|"));. |
|00005210| 20 20 20 20 20 76 61 72 | 20 73 65 61 72 63 68 42 | var| searchB|
|00005220| 6f 78 20 3d 20 66 69 6e | 64 4d 61 69 6c 53 65 61 |ox = fin|dMailSea|
|00005230| 72 63 68 42 6f 78 28 29 | 3b 0a 20 20 20 20 20 20 |rchBox()|;. |
|00005240| 20 20 69 66 20 28 73 65 | 61 72 63 68 42 6f 78 29 | if (se|archBox)|
|00005250| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | {. | c|
|00005260| 6f 6c 6c 61 70 73 65 45 | 6c 65 6d 65 6e 74 28 73 |ollapseE|lement(s|
|00005270| 65 61 72 63 68 42 6f 78 | 29 3b 0a 20 20 20 20 20 |earchBox|);. |
|00005280| 20 20 20 7d 0a 20 20 20 | 20 20 20 20 20 75 6e 63 | }. | unc|
|00005290| 6f 6c 6c 61 70 73 65 45 | 6c 65 6d 65 6e 74 28 63 |ollapseE|lement(c|
|000052a0| 61 6c 65 6e 64 61 72 56 | 69 65 77 42 6f 78 29 3b |alendarV|iewBox);|
|000052b0| 0a 20 20 20 20 7d 0a 0a | 20 20 20 20 76 61 72 20 |. }..| var |
|000052c0| 76 69 65 77 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e |view = d|ocument.|
|000052d0| 67 65 74 45 6c 65 6d 65 | 6e 74 42 79 49 64 28 74 |getEleme|ntById(t|
|000052e0| 79 70 65 2b 22 2d 76 69 | 65 77 22 29 3b 0a 20 20 |ype+"-vi|ew");. |
|000052f0| 20 20 76 61 72 20 72 6f | 74 61 74 65 64 20 3d 20 | var ro|tated = |
|00005300| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00005310| 65 6e 74 42 79 49 64 28 | 22 6c 74 6e 2d 6d 75 6c |entById(|"ltn-mul|
|00005320| 74 69 64 61 79 2d 72 6f | 74 61 74 65 64 22 29 3b |tiday-ro|tated");|
|00005330| 0a 0a 20 20 20 20 69 66 | 20 28 21 76 69 65 77 2e |.. if| (!view.|
|00005340| 69 6e 69 74 69 61 6c 69 | 7a 65 64 29 20 7b 0a 20 |initiali|zed) {. |
|00005350| 20 20 20 20 20 20 20 2f | 2f 20 53 65 74 20 75 70 | /|/ Set up|
|00005360| 20 74 68 69 73 20 76 69 | 65 77 20 77 69 74 68 20 | this vi|ew with |
|00005370| 74 68 65 20 63 75 72 72 | 65 6e 74 20 76 69 65 77 |the curr|ent view|
|00005380| 2d 63 68 65 63 6b 62 6f | 78 20 76 61 6c 75 65 73 |-checkbo|x values|
|00005390| 0a 20 20 20 20 20 20 20 | 20 76 61 72 20 77 6f 72 |. | var wor|
|000053a0| 6b 64 61 79 73 4d 65 6e | 75 20 3d 20 64 6f 63 75 |kdaysMen|u = docu|
|000053b0| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|000053c0| 79 49 64 28 22 6c 74 6e | 2d 77 6f 72 6b 64 61 79 |yId("ltn|-workday|
|000053d0| 73 2d 6f 6e 6c 79 22 29 | 3b 0a 20 20 20 20 20 20 |s-only")|;. |
|000053e0| 20 20 76 69 65 77 2e 77 | 6f 72 6b 64 61 79 73 4f | view.w|orkdaysO|
|000053f0| 6e 6c 79 20 3d 20 28 77 | 6f 72 6b 64 61 79 73 4d |nly = (w|orkdaysM|
|00005400| 65 6e 75 2e 67 65 74 41 | 74 74 72 69 62 75 74 65 |enu.getA|ttribute|
|00005410| 28 22 63 68 65 63 6b 65 | 64 22 29 20 3d 3d 20 27 |("checke|d") == '|
|00005420| 74 72 75 65 27 29 3b 0a | 0a 20 20 20 20 20 20 20 |true');.|. |
|00005430| 20 76 61 72 20 74 61 73 | 6b 73 4d 65 6e 75 20 3d | var tas|ksMenu =|
|00005440| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00005450| 6d 65 6e 74 42 79 49 64 | 28 22 6c 74 6e 2d 74 61 |mentById|("ltn-ta|
|00005460| 73 6b 73 2d 69 6e 2d 76 | 69 65 77 22 29 0a 20 20 |sks-in-v|iew"). |
|00005470| 20 20 20 20 20 20 76 69 | 65 77 2e 74 61 73 6b 73 | vi|ew.tasks|
|00005480| 49 6e 56 69 65 77 20 3d | 20 28 74 61 73 6b 73 4d |InView =| (tasksM|
|00005490| 65 6e 75 2e 67 65 74 41 | 74 74 72 69 62 75 74 65 |enu.getA|ttribute|
|000054a0| 28 22 63 68 65 63 6b 65 | 64 22 29 20 3d 3d 20 27 |("checke|d") == '|
|000054b0| 74 72 75 65 27 29 3b 0a | 20 20 20 20 20 20 20 20 |true');.| |
|000054c0| 76 69 65 77 2e 73 68 6f | 77 43 6f 6d 70 6c 65 74 |view.sho|wComplet|
|000054d0| 65 64 20 3d 20 21 64 6f | 63 75 6d 65 6e 74 2e 67 |ed = !do|cument.g|
|000054e0| 65 74 45 6c 65 6d 65 6e | 74 42 79 49 64 28 22 68 |etElemen|tById("h|
|000054f0| 69 64 65 2d 63 6f 6d 70 | 6c 65 74 65 64 2d 63 68 |ide-comp|leted-ch|
|00005500| 65 63 6b 62 6f 78 22 29 | 2e 63 68 65 63 6b 65 64 |eckbox")|.checked|
|00005510| 3b 0a 0a 20 20 20 20 20 | 20 20 20 76 69 65 77 2e |;.. | view.|
|00005520| 72 6f 74 61 74 65 64 20 | 3d 20 28 72 6f 74 61 74 |rotated |= (rotat|
|00005530| 65 64 2e 67 65 74 41 74 | 74 72 69 62 75 74 65 28 |ed.getAt|tribute(|
|00005540| 22 63 68 65 63 6b 65 64 | 22 29 20 3d 3d 20 27 74 |"checked|") == 't|
|00005550| 72 75 65 27 29 3b 0a 20 | 20 20 20 7d 0a 0a 20 20 |rue');. | }.. |
|00005560| 20 20 2f 2f 20 44 69 73 | 61 62 6c 65 20 74 68 65 | // Dis|able the|
|00005570| 20 6d 65 6e 75 69 74 65 | 6d 20 77 68 65 6e 20 6e | menuite|m when n|
|00005580| 6f 74 20 69 6e 20 64 61 | 79 20 6f 72 20 77 65 65 |ot in da|y or wee|
|00005590| 6b 20 76 69 65 77 2e 0a | 20 20 20 20 69 66 20 28 |k view..| if (|
|000055a0| 74 79 70 65 20 3d 3d 20 | 22 64 61 79 22 20 7c 7c |type == |"day" |||
|000055b0| 20 74 79 70 65 20 3d 3d | 20 22 77 65 65 6b 22 29 | type ==| "week")|
|000055c0| 20 7b 0a 20 20 20 20 20 | 20 20 20 72 6f 74 61 74 | {. | rotat|
|000055d0| 65 64 2e 72 65 6d 6f 76 | 65 41 74 74 72 69 62 75 |ed.remov|eAttribu|
|000055e0| 74 65 28 22 64 69 73 61 | 62 6c 65 64 22 29 3b 0a |te("disa|bled");.|
|000055f0| 20 20 20 20 7d 20 65 6c | 73 65 20 7b 0a 20 20 20 | } el|se {. |
|00005600| 20 20 20 20 20 72 6f 74 | 61 74 65 64 2e 73 65 74 | rot|ated.set|
|00005610| 41 74 74 72 69 62 75 74 | 65 28 22 64 69 73 61 62 |Attribut|e("disab|
|00005620| 6c 65 64 22 2c 20 74 72 | 75 65 29 3b 0a 20 20 20 |led", tr|ue);. |
|00005630| 20 7d 0a 0a 20 20 20 20 | 64 6f 63 75 6d 65 6e 74 | }.. |document|
|00005640| 2e 67 65 74 45 6c 65 6d | 65 6e 74 42 79 49 64 28 |.getElem|entById(|
|00005650| 22 64 69 73 70 6c 61 79 | 44 65 63 6b 22 29 2e 73 |"display|Deck").s|
|00005660| 65 6c 65 63 74 65 64 50 | 61 6e 65 6c 20 3d 20 20 |electedP|anel = |
|00005670| 63 61 6c 65 6e 64 61 72 | 56 69 65 77 42 6f 78 3b |calendar|ViewBox;|
|00005680| 0a 20 20 20 20 73 77 69 | 74 63 68 54 6f 56 69 65 |. swi|tchToVie|
|00005690| 77 28 74 79 70 65 29 3b | 0a 0a 20 20 20 20 2f 2f |w(type);|.. //|
|000056a0| 20 53 65 74 20 74 68 65 | 20 6c 61 62 65 6c 73 20 | Set the| labels |
|000056b0| 66 6f 72 20 74 68 65 20 | 63 6f 6e 74 65 78 74 2d |for the |context-|
|000056c0| 6d 65 6e 75 0a 20 20 20 | 20 76 61 72 20 6e 65 78 |menu. | var nex|
|000056d0| 74 43 6f 6d 6d 61 6e 64 | 20 3d 20 64 6f 63 75 6d |tCommand| = docum|
|000056e0| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|000056f0| 49 64 28 22 63 6f 6e 74 | 65 78 74 5f 6e 65 78 74 |Id("cont|ext_next|
|00005700| 22 29 3b 0a 20 20 20 20 | 6e 65 78 74 43 6f 6d 6d |");. |nextComm|
|00005710| 61 6e 64 2e 73 65 74 41 | 74 74 72 69 62 75 74 65 |and.setA|ttribute|
|00005720| 28 22 6c 61 62 65 6c 22 | 2c 20 6e 65 78 74 43 6f |("label"|, nextCo|
|00005730| 6d 6d 61 6e 64 2e 67 65 | 74 41 74 74 72 69 62 75 |mmand.ge|tAttribu|
|00005740| 74 65 28 22 6c 61 62 65 | 6c 2d 22 2b 74 79 70 65 |te("labe|l-"+type|
|00005750| 29 29 3b 0a 20 20 20 20 | 76 61 72 20 70 72 65 76 |));. |var prev|
|00005760| 69 6f 75 73 43 6f 6d 6d | 61 6e 64 20 3d 20 64 6f |iousComm|and = do|
|00005770| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|00005780| 74 42 79 49 64 28 22 63 | 6f 6e 74 65 78 74 5f 70 |tById("c|ontext_p|
|00005790| 72 65 76 69 6f 75 73 22 | 29 0a 20 20 20 20 70 72 |revious"|). pr|
|000057a0| 65 76 69 6f 75 73 43 6f | 6d 6d 61 6e 64 2e 73 65 |eviousCo|mmand.se|
|000057b0| 74 41 74 74 72 69 62 75 | 74 65 28 22 6c 61 62 65 |tAttribu|te("labe|
|000057c0| 6c 22 2c 20 70 72 65 76 | 69 6f 75 73 43 6f 6d 6d |l", prev|iousComm|
|000057d0| 61 6e 64 2e 67 65 74 41 | 74 74 72 69 62 75 74 65 |and.getA|ttribute|
|000057e0| 28 22 6c 61 62 65 6c 2d | 22 2b 74 79 70 65 29 29 |("label-|"+type))|
|000057f0| 3b 0a 0a 20 20 20 20 2f | 2f 20 53 65 74 20 75 70 |;.. /|/ Set up|
|00005800| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 73 0a 20 20 | the com|mands. |
|00005810| 20 20 76 61 72 20 61 76 | 61 69 6c 61 62 6c 65 56 | var av|ailableV|
|00005820| 69 65 77 73 20 3d 20 67 | 65 74 56 69 65 77 44 65 |iews = g|etViewDe|
|00005830| 63 6b 28 29 3b 0a 20 20 | 20 20 66 6f 72 20 28 76 |ck();. | for (v|
|00005840| 61 72 20 69 20 3d 20 30 | 3b 20 69 20 3c 20 61 76 |ar i = 0|; i < av|
|00005850| 61 69 6c 61 62 6c 65 56 | 69 65 77 73 2e 63 68 69 |ailableV|iews.chi|
|00005860| 6c 64 4e 6f 64 65 73 2e | 6c 65 6e 67 74 68 3b 20 |ldNodes.|length; |
|00005870| 69 2b 2b 29 20 7b 0a 20 | 20 20 20 20 20 20 20 76 |i++) {. | v|
|00005880| 61 72 20 76 69 65 77 20 | 3d 20 61 76 61 69 6c 61 |ar view |= availa|
|00005890| 62 6c 65 56 69 65 77 73 | 2e 63 68 69 6c 64 4e 6f |bleViews|.childNo|
|000058a0| 64 65 73 5b 69 5d 3b 0a | 20 20 20 20 20 20 20 20 |des[i];.| |
|000058b0| 76 61 72 20 63 6f 6d 6d | 61 6e 64 20 3d 20 64 6f |var comm|and = do|
|000058c0| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|000058d0| 74 42 79 49 64 28 76 69 | 65 77 2e 69 64 2b 22 2d |tById(vi|ew.id+"-|
|000058e0| 63 6f 6d 6d 61 6e 64 22 | 29 3b 0a 20 20 20 20 20 |command"|);. |
|000058f0| 20 20 20 69 66 20 28 76 | 69 65 77 2e 69 64 20 3d | if (v|iew.id =|
|00005900| 3d 20 74 79 70 65 2b 22 | 2d 76 69 65 77 22 29 20 |= type+"|-view") |
|00005910| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 63 6f 6d |{. | com|
|00005920| 6d 61 6e 64 2e 73 65 74 | 41 74 74 72 69 62 75 74 |mand.set|Attribut|
|00005930| 65 28 22 63 68 65 63 6b | 65 64 22 2c 20 74 72 75 |e("check|ed", tru|
|00005940| 65 29 3b 0a 20 20 20 20 | 20 20 20 20 7d 20 65 6c |e);. | } el|
|00005950| 73 65 20 7b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |se {. | |
|00005960| 63 6f 6d 6d 61 6e 64 2e | 72 65 6d 6f 76 65 41 74 |command.|removeAt|
|00005970| 74 72 69 62 75 74 65 28 | 22 63 68 65 63 6b 65 64 |tribute(|"checked|
|00005980| 22 29 3b 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 |");. | }. |
|00005990| 20 20 7d 0a 7d 0a 0a 66 | 75 6e 63 74 69 6f 6e 20 | }.}..f|unction |
|000059a0| 67 6f 54 6f 54 6f 64 61 | 79 28 29 0a 7b 0a 20 20 |goToToda|y().{. |
|000059b0| 20 20 2f 2f 20 73 65 74 | 20 74 68 65 20 63 75 72 | // set| the cur|
|000059c0| 72 65 6e 74 20 64 61 74 | 65 20 69 6e 20 74 68 65 |rent dat|e in the|
|000059d0| 20 6d 69 6e 69 6d 6f 6e | 74 68 20 63 6f 6e 74 72 | minimon|th contr|
|000059e0| 6f 6c 3b 0a 20 20 20 20 | 2f 2f 20 6e 6f 74 65 2c |ol;. |// note,|
|000059f0| 20 74 68 61 74 20 74 68 | 65 20 63 75 72 72 65 6e | that th|e curren|
|00005a00| 74 20 76 69 65 77 20 69 | 6e 20 74 68 65 20 63 61 |t view i|n the ca|
|00005a10| 6c 65 6e 64 61 72 2d 76 | 69 65 77 2d 62 6f 78 20 |lendar-v|iew-box |
|00005a20| 69 73 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |is autom|atically|
|00005a30| 20 75 70 64 61 74 65 64 | 0a 20 20 20 20 76 61 72 | updated|. var|
|00005a40| 20 63 75 72 72 65 6e 74 | 44 61 79 20 3d 20 74 6f | current|Day = to|
|00005a50| 64 61 79 28 29 3b 0a 20 | 20 20 20 64 6f 63 75 6d |day();. | docum|
|00005a60| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00005a70| 49 64 28 22 6c 74 6e 4d | 69 6e 69 6d 6f 6e 74 68 |Id("ltnM|inimonth|
|00005a80| 22 29 2e 76 61 6c 75 65 | 20 3d 20 63 75 72 72 65 |").value| = curre|
|00005a90| 6e 74 44 61 79 2e 6a 73 | 44 61 74 65 3b 0a 7d 0a |ntDay.js|Date;.}.|
|00005aa0| 0a 0a 66 75 6e 63 74 69 | 6f 6e 20 74 6f 67 67 6c |..functi|on toggl|
|00005ab0| 65 54 6f 64 61 79 50 61 | 6e 65 69 6e 4d 61 69 6c |eTodayPa|neinMail|
|00005ac0| 4d 6f 64 65 28 29 0a 7b | 0a 20 20 76 61 72 20 6f |Mode().{|. var o|
|00005ad0| 54 6f 64 61 79 50 61 6e | 65 20 3d 20 64 6f 63 75 |TodayPan|e = docu|
|00005ae0| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00005af0| 79 49 64 28 22 74 6f 64 | 61 79 2d 70 61 6e 65 2d |yId("tod|ay-pane-|
|00005b00| 70 61 6e 65 6c 22 29 3b | 0a 20 20 76 61 72 20 74 |panel");|. var t|
|00005b10| 6f 64 61 79 50 61 6e 65 | 43 6f 6d 6d 61 6e 64 20 |odayPane|Command |
|00005b20| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |= docume|nt.getEl|
|00005b30| 65 6d 65 6e 74 42 79 49 | 64 28 27 63 6d 64 5f 74 |ementByI|d('cmd_t|
|00005b40| 6f 67 67 6c 65 54 6f 64 | 61 79 50 61 6e 65 27 29 |oggleTod|ayPane')|
|00005b50| 3b 0a 20 20 69 66 20 28 | 6f 54 6f 64 61 79 50 61 |;. if (|oTodayPa|
|00005b60| 6e 65 2e 68 61 73 41 74 | 74 72 69 62 75 74 65 28 |ne.hasAt|tribute(|
|00005b70| 22 63 6f 6c 6c 61 70 73 | 65 64 22 29 29 20 7b 0a |"collaps|ed")) {.|
|00005b80| 20 20 20 20 6f 54 6f 64 | 61 79 50 61 6e 65 2e 72 | oTod|ayPane.r|
|00005b90| 65 6d 6f 76 65 41 74 74 | 72 69 62 75 74 65 28 22 |emoveAtt|ribute("|
|00005ba0| 63 6f 6c 6c 61 70 73 65 | 64 22 29 3b 0a 20 20 20 |collapse|d");. |
|00005bb0| 20 6f 54 6f 64 61 79 50 | 61 6e 65 2e 72 65 6d 6f | oTodayP|ane.remo|
|00005bc0| 76 65 41 74 74 72 69 62 | 75 74 65 28 22 63 6f 6c |veAttrib|ute("col|
|00005bd0| 6c 61 70 73 65 64 69 6e | 4d 61 69 6c 4d 6f 64 65 |lapsedin|MailMode|
|00005be0| 22 29 3b 0a 20 20 20 20 | 74 6f 64 61 79 50 61 6e |");. |todayPan|
|00005bf0| 65 43 6f 6d 6d 61 6e 64 | 2e 73 65 74 41 74 74 72 |eCommand|.setAttr|
|00005c00| 69 62 75 74 65 28 22 63 | 68 65 63 6b 65 64 22 2c |ibute("c|hecked",|
|00005c10| 22 74 72 75 65 22 29 3b | 0a 20 20 20 20 64 6f 63 |"true");|. doc|
|00005c20| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|00005c30| 42 79 49 64 28 22 74 6f | 64 61 79 2d 63 6c 6f 73 |ById("to|day-clos|
|00005c40| 65 72 22 29 2e 73 65 74 | 41 74 74 72 69 62 75 74 |er").set|Attribut|
|00005c50| 65 28 22 63 68 65 63 6b | 65 64 22 2c 20 22 66 61 |e("check|ed", "fa|
|00005c60| 6c 73 65 22 29 3b 0a 20 | 20 7d 0a 20 20 65 6c 73 |lse");. | }. els|
|00005c70| 65 20 7b 0a 20 20 20 20 | 6f 54 6f 64 61 79 50 61 |e {. |oTodayPa|
|00005c80| 6e 65 2e 73 65 74 41 74 | 74 72 69 62 75 74 65 28 |ne.setAt|tribute(|
|00005c90| 22 63 6f 6c 6c 61 70 73 | 65 64 22 2c 20 74 72 75 |"collaps|ed", tru|
|00005ca0| 65 29 3b 0a 20 20 20 20 | 6f 54 6f 64 61 79 50 61 |e);. |oTodayPa|
|00005cb0| 6e 65 2e 73 65 74 41 74 | 74 72 69 62 75 74 65 28 |ne.setAt|tribute(|
|00005cc0| 22 63 6f 6c 6c 61 70 73 | 65 64 69 6e 4d 61 69 6c |"collaps|edinMail|
|00005cd0| 4d 6f 64 65 22 2c 20 22 | 74 72 75 65 22 29 3b 0a |Mode", "|true");.|
|00005ce0| 20 20 20 20 74 6f 64 61 | 79 50 61 6e 65 43 6f 6d | toda|yPaneCom|
|00005cf0| 6d 61 6e 64 2e 73 65 74 | 41 74 74 72 69 62 75 74 |mand.set|Attribut|
|00005d00| 65 28 22 63 68 65 63 6b | 65 64 22 2c 20 22 66 61 |e("check|ed", "fa|
|00005d10| 6c 73 65 22 29 3b 0a 20 | 20 7d 0a 7d 0a 0a 66 75 |lse");. | }.}..fu|
|00005d20| 6e 63 74 69 6f 6e 20 73 | 65 6c 65 63 74 65 64 43 |nction s|electedC|
|00005d30| 61 6c 65 6e 64 61 72 50 | 61 6e 65 28 65 76 65 6e |alendarP|ane(even|
|00005d40| 74 29 0a 7b 0a 20 20 20 | 20 76 61 72 20 64 65 63 |t).{. | var dec|
|00005d50| 6b 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 |k = docu|ment.get|
|00005d60| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 22 64 69 73 |ElementB|yId("dis|
|00005d70| 70 6c 61 79 44 65 63 6b | 22 29 3b 0a 0a 20 20 20 |playDeck|");.. |
|00005d80| 20 2f 2f 20 49 66 20 77 | 65 27 72 65 20 61 6c 72 | // If w|e're alr|
|00005d90| 65 61 64 79 20 73 68 6f | 77 69 6e 67 20 61 20 63 |eady sho|wing a c|
|00005da0| 61 6c 65 6e 64 61 72 20 | 76 69 65 77 2c 20 64 6f |alendar |view, do|
|00005db0| 6e 27 74 20 64 6f 20 61 | 6e 79 74 68 69 6e 67 0a |n't do a|nything.|
|00005dc0| 20 20 20 20 69 66 20 28 | 64 65 63 6b 2e 73 65 6c | if (|deck.sel|
|00005dd0| 65 63 74 65 64 50 61 6e | 65 6c 2e 69 64 20 3d 3d |ectedPan|el.id ==|
|00005de0| 20 22 63 61 6c 65 6e 64 | 61 72 2d 76 69 65 77 2d | "calend|ar-view-|
|00005df0| 62 6f 78 22 29 0a 20 20 | 20 20 20 20 20 20 72 65 |box"). | re|
|00005e00| 74 75 72 6e 3b 0a 0a 20 | 20 20 20 64 65 63 6b 2e |turn;.. | deck.|
|00005e10| 73 65 6c 65 63 74 65 64 | 50 61 6e 65 6c 20 3d 20 |selected|Panel = |
|00005e20| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00005e30| 65 6e 74 42 79 49 64 28 | 22 63 61 6c 65 6e 64 61 |entById(|"calenda|
|00005e40| 72 2d 76 69 65 77 2d 62 | 6f 78 22 29 3b 0a 0a 20 |r-view-b|ox");.. |
|00005e50| 20 20 20 73 68 6f 77 43 | 61 6c 65 6e 64 61 72 56 | showC|alendarV|
|00005e60| 69 65 77 28 27 77 65 65 | 6b 27 29 3b 0a 7d 0a 0a |iew('wee|k');.}..|
|00005e70| 66 75 6e 63 74 69 6f 6e | 20 4c 74 6e 4f 62 73 65 |function| LtnObse|
|00005e80| 72 76 65 44 69 73 70 6c | 61 79 44 65 63 6b 43 68 |rveDispl|ayDeckCh|
|00005e90| 61 6e 67 65 28 65 76 65 | 6e 74 29 0a 7b 0a 20 20 |ange(eve|nt).{. |
|00005ea0| 20 20 76 61 72 20 64 65 | 63 6b 20 3d 20 65 76 65 | var de|ck = eve|
|00005eb0| 6e 74 2e 74 61 72 67 65 | 74 3b 0a 0a 20 20 20 20 |nt.targe|t;.. |
|00005ec0| 2f 2f 20 42 75 67 20 33 | 30 39 35 30 35 3a 20 54 |// Bug 3|09505: T|
|00005ed0| 68 65 20 27 73 65 6c 65 | 63 74 27 20 65 76 65 6e |he 'sele|ct' even|
|00005ee0| 74 20 61 6c 73 6f 20 66 | 69 72 65 73 20 77 68 65 |t also f|ires whe|
|00005ef0| 6e 20 77 65 20 63 68 61 | 6e 67 65 20 74 68 65 20 |n we cha|nge the |
|00005f00| 73 65 6c 65 63 74 65 64 | 0a 20 20 20 20 2f 2f 20 |selected|. // |
|00005f10| 70 61 6e 65 6c 20 6f 66 | 20 63 61 6c 65 6e 64 61 |panel of| calenda|
|00005f20| 72 2d 76 69 65 77 2d 62 | 6f 78 2e 20 20 57 6f 72 |r-view-b|ox. Wor|
|00005f30| 6b 61 72 6f 75 6e 64 20 | 77 69 74 68 20 74 68 69 |karound |with thi|
|00005f40| 73 20 63 68 65 63 6b 2e | 0a 20 20 20 20 69 66 20 |s check.|. if |
|00005f50| 28 64 65 63 6b 2e 69 64 | 20 21 3d 20 22 64 69 73 |(deck.id| != "dis|
|00005f60| 70 6c 61 79 44 65 63 6b | 22 29 20 7b 0a 20 20 20 |playDeck|") {. |
|00005f70| 20 20 20 20 20 72 65 74 | 75 72 6e 3b 0a 20 20 20 | ret|urn;. |
|00005f80| 20 7d 0a 0a 20 20 20 20 | 76 61 72 20 69 64 20 3d | }.. |var id =|
|00005f90| 20 6e 75 6c 6c 3b 0a 20 | 20 20 20 74 72 79 20 7b | null;. | try {|
|00005fa0| 20 69 64 20 3d 20 64 65 | 63 6b 2e 73 65 6c 65 63 | id = de|ck.selec|
|00005fb0| 74 65 64 50 61 6e 65 6c | 2e 69 64 20 7d 20 63 61 |tedPanel|.id } ca|
|00005fc0| 74 63 68 20 28 65 29 20 | 7b 20 7d 0a 0a 20 20 20 |tch (e) |{ }.. |
|00005fd0| 20 2f 2f 20 4e 6f 77 20 | 77 65 27 72 65 20 73 77 | // Now |we're sw|
|00005fe0| 69 74 63 68 69 6e 67 20 | 62 61 63 6b 20 74 6f 20 |itching |back to |
|00005ff0| 74 68 65 20 6d 61 69 6c | 20 76 69 65 77 2c 20 73 |the mail| view, s|
|00006000| 6f 20 70 75 74 20 65 76 | 65 72 79 74 68 69 6e 67 |o put ev|erything|
|00006010| 20 62 61 63 6b 20 74 68 | 61 74 0a 20 20 20 20 2f | back th|at. /|
|00006020| 2f 20 77 65 20 63 6f 6c | 6c 61 70 73 65 64 20 69 |/ we col|lapsed i|
|00006030| 6e 20 73 68 6f 77 43 61 | 6c 65 6e 64 61 72 56 69 |n showCa|lendarVi|
|00006040| 65 77 28 29 0a 20 20 20 | 20 69 66 20 28 69 64 20 |ew(). | if (id |
|00006050| 21 3d 20 22 63 61 6c 65 | 6e 64 61 72 2d 76 69 65 |!= "cale|ndar-vie|
|00006060| 77 2d 62 6f 78 22 29 20 | 7b 0a 20 20 20 20 20 20 |w-box") |{. |
|00006070| 20 20 69 66 20 28 67 43 | 75 72 72 65 6e 74 4d 6f | if (gC|urrentMo|
|00006080| 64 65 20 21 3d 20 27 6d | 61 69 6c 27 29 20 7b 0a |de != 'm|ail') {.|
|00006090| 20 20 20 20 20 20 20 20 | 20 20 20 20 6c 74 6e 53 | | ltnS|
|000060a0| 77 69 74 63 68 32 4d 61 | 69 6c 28 29 3b 0a 20 20 |witch2Ma|il();. |
|000060b0| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 20 20 | }.| |
|000060c0| 63 6f 6c 6c 61 70 73 65 | 45 6c 65 6d 65 6e 74 28 |collapse|Element(|
|000060d0| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|000060e0| 65 6e 74 42 79 49 64 28 | 22 63 61 6c 65 6e 64 61 |entById(|"calenda|
|000060f0| 72 2d 76 69 65 77 2d 62 | 6f 78 22 29 29 3b 0a 20 |r-view-b|ox"));. |
|00006100| 20 20 20 20 20 20 20 75 | 6e 63 6f 6c 6c 61 70 73 | u|ncollaps|
|00006110| 65 45 6c 65 6d 65 6e 74 | 28 47 65 74 4d 65 73 73 |eElement|(GetMess|
|00006120| 61 67 65 50 61 6e 65 28 | 29 29 3b 0a 20 20 20 20 |agePane(|));. |
|00006130| 20 20 20 20 75 6e 63 6f | 6c 6c 61 70 73 65 45 6c | unco|llapseEl|
|00006140| 65 6d 65 6e 74 28 64 6f | 63 75 6d 65 6e 74 2e 67 |ement(do|cument.g|
|00006150| 65 74 45 6c 65 6d 65 6e | 74 42 79 49 64 28 22 74 |etElemen|tById("t|
|00006160| 68 72 65 61 64 70 61 6e | 65 2d 73 70 6c 69 74 74 |hreadpan|e-splitt|
|00006170| 65 72 22 29 29 3b 0a 20 | 20 20 20 20 20 20 20 76 |er"));. | v|
|00006180| 61 72 20 73 65 61 72 63 | 68 42 6f 78 20 3d 20 66 |ar searc|hBox = f|
|00006190| 69 6e 64 4d 61 69 6c 53 | 65 61 72 63 68 42 6f 78 |indMailS|earchBox|
|000061a0| 28 29 3b 0a 20 20 20 20 | 20 20 20 20 69 66 20 28 |();. | if (|
|000061b0| 73 65 61 72 63 68 42 6f | 78 29 20 7b 0a 20 20 20 |searchBo|x) {. |
|000061c0| 20 20 20 20 20 20 20 20 | 20 75 6e 63 6f 6c 6c 61 | | uncolla|
|000061d0| 70 73 65 45 6c 65 6d 65 | 6e 74 28 73 65 61 72 63 |pseEleme|nt(searc|
|000061e0| 68 42 6f 78 29 3b 0a 20 | 20 20 20 20 20 20 20 7d |hBox);. | }|
|000061f0| 0a 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 44 69 73 |.. | // Dis|
|00006200| 61 62 6c 65 20 74 68 65 | 20 72 6f 74 61 74 65 20 |able the| rotate |
|00006210| 76 69 65 77 20 6d 65 6e | 75 69 74 65 6d 0a 20 20 |view men|uitem. |
|00006220| 20 20 20 20 20 20 64 6f | 63 75 6d 65 6e 74 2e 67 | do|cument.g|
|00006230| 65 74 45 6c 65 6d 65 6e | 74 42 79 49 64 28 22 6c |etElemen|tById("l|
|00006240| 74 6e 2d 6d 75 6c 74 69 | 64 61 79 2d 72 6f 74 61 |tn-multi|day-rota|
|00006250| 74 65 64 22 29 0a 20 20 | 20 20 20 20 20 20 20 20 |ted"). | |
|00006260| 20 20 20 20 20 20 2e 73 | 65 74 41 74 74 72 69 62 | .s|etAttrib|
|00006270| 75 74 65 28 22 64 69 73 | 61 62 6c 65 64 22 2c 20 |ute("dis|abled", |
|00006280| 74 72 75 65 29 3b 0a 20 | 20 20 20 7d 0a 7d 0a 0a |true);. | }.}..|
|00006290| 66 75 6e 63 74 69 6f 6e | 20 6c 74 6e 46 69 6e 69 |function| ltnFini|
|000062a0| 73 68 28 29 20 7b 0a 20 | 20 20 20 67 65 74 43 6f |sh() {. | getCo|
|000062b0| 6d 70 6f 73 69 74 65 43 | 61 6c 65 6e 64 61 72 28 |mpositeC|alendar(|
|000062c0| 29 2e 72 65 6d 6f 76 65 | 4f 62 73 65 72 76 65 72 |).remove|Observer|
|000062d0| 28 61 67 65 6e 64 61 54 | 72 65 65 56 69 65 77 2e |(agendaT|reeView.|
|000062e0| 63 61 6c 65 6e 64 61 72 | 4f 62 73 65 72 76 65 72 |calendar|Observer|
|000062f0| 29 3b 0a 0a 20 20 20 20 | 66 69 6e 69 73 68 43 61 |);.. |finishCa|
|00006300| 6c 65 6e 64 61 72 54 6f | 44 6f 55 6e 69 66 69 6e |lendarTo|DoUnifin|
|00006310| 64 65 72 28 29 3b 0a 0a | 20 20 20 20 75 6e 6c 6f |der();..| unlo|
|00006320| 61 64 43 61 6c 65 6e 64 | 61 72 4d 61 6e 61 67 65 |adCalend|arManage|
|00006330| 72 28 29 3b 0a 7d 0a 0a | 66 75 6e 63 74 69 6f 6e |r();.}..|function|
|00006340| 20 6c 74 6e 45 64 69 74 | 53 65 6c 65 63 74 65 64 | ltnEdit|Selected|
|00006350| 49 74 65 6d 28 29 20 7b | 0a 20 20 20 20 76 61 72 |Item() {|. var|
|00006360| 20 73 65 6c 65 63 74 65 | 64 49 74 65 6d 73 20 3d | selecte|dItems =|
|00006370| 20 63 75 72 72 65 6e 74 | 56 69 65 77 28 29 2e 67 | current|View().g|
|00006380| 65 74 53 65 6c 65 63 74 | 65 64 49 74 65 6d 73 28 |etSelect|edItems(|
|00006390| 7b 7d 29 3b 0a 20 20 20 | 20 66 6f 72 20 65 61 63 |{});. | for eac|
|000063a0| 68 20 28 76 61 72 20 69 | 74 65 6d 20 69 6e 20 73 |h (var i|tem in s|
|000063b0| 65 6c 65 63 74 65 64 49 | 74 65 6d 73 29 20 7b 0a |electedI|tems) {.|
|000063c0| 20 20 20 20 20 20 20 20 | 63 61 6c 65 6e 64 61 72 | |calendar|
|000063d0| 56 69 65 77 43 6f 6e 74 | 72 6f 6c 6c 65 72 2e 6d |ViewCont|roller.m|
|000063e0| 6f 64 69 66 79 4f 63 63 | 75 72 72 65 6e 63 65 28 |odifyOcc|urrence(|
|000063f0| 69 74 65 6d 29 3b 0a 20 | 20 20 20 7d 0a 7d 0a 0a |item);. | }.}..|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.